mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Revert "Try to debug why TestShowZonesOnShiftDuringDrag don't run"
This reverts commit a0cab997e0.
This commit is contained in:
@@ -181,75 +181,14 @@ namespace Microsoft.PowerToys.UITest
|
|||||||
ExitExe(runnerProcessInfo.FileName);
|
ExitExe(runnerProcessInfo.FileName);
|
||||||
runner = Process.Start(runnerProcessInfo);
|
runner = Process.Start(runnerProcessInfo);
|
||||||
|
|
||||||
WaitForWindowAndSetCapability(opts, "PowerToys Settings", 5000, 3);
|
WaitForWindowAndSetCapability(opts, "PowerToys Settings", 5000, 5);
|
||||||
|
|
||||||
// Exit CmdPal UI before launching new process if use installer for test
|
// Exit CmdPal UI before launching new process if use installer for test
|
||||||
ExitExeByName("Microsoft.CmdPal.UI");
|
ExitExeByName("Microsoft.CmdPal.UI");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
// Visual debugging: Execute command via CMD with visible window
|
throw new InvalidOperationException($"Failed to launch PowerToys Settings: {ex.Message}", ex);
|
||||||
Debug.WriteLine($"Failed to launch PowerToys Settings. Executing visual debug...");
|
|
||||||
|
|
||||||
var debugCmdInfo = new ProcessStartInfo
|
|
||||||
{
|
|
||||||
FileName = "cmd.exe",
|
|
||||||
Arguments = $"/k \"{locationPath + runnerPath}\" --open-settings",
|
|
||||||
UseShellExecute = true,
|
|
||||||
CreateNoWindow = false,
|
|
||||||
WindowStyle = ProcessWindowStyle.Normal,
|
|
||||||
};
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Process.Start(debugCmdInfo);
|
|
||||||
}
|
|
||||||
catch (Exception cmdEx)
|
|
||||||
{
|
|
||||||
Debug.WriteLine($"Failed to start debug CMD: {cmdEx.Message}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Show Task Manager filtered by "Power"
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var taskMgrInfo = new ProcessStartInfo
|
|
||||||
{
|
|
||||||
FileName = "taskmgr.exe",
|
|
||||||
Arguments = "/0",
|
|
||||||
UseShellExecute = true,
|
|
||||||
};
|
|
||||||
Process.Start(taskMgrInfo);
|
|
||||||
|
|
||||||
// Give Task Manager time to open
|
|
||||||
Thread.Sleep(3000);
|
|
||||||
|
|
||||||
// List all "Power" processes in debug output
|
|
||||||
Debug.WriteLine("\n=== PowerToys Related Processes ===");
|
|
||||||
var powerProcesses = Process.GetProcesses()
|
|
||||||
.Where(p => p.ProcessName.Contains("Power", StringComparison.OrdinalIgnoreCase))
|
|
||||||
.ToList();
|
|
||||||
|
|
||||||
foreach (var proc in powerProcesses)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Debug.WriteLine($"Process: {proc.ProcessName}, ID: {proc.Id}, Path: {proc.MainModule?.FileName ?? "N/A"}");
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
Debug.WriteLine($"Process: {proc.ProcessName}, ID: {proc.Id}, Path: [Access Denied]");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.WriteLine("=================================\n");
|
|
||||||
}
|
|
||||||
catch (Exception tmEx)
|
|
||||||
{
|
|
||||||
Debug.WriteLine($"Failed to show Task Manager: {tmEx.Message}");
|
|
||||||
}
|
|
||||||
|
|
||||||
Thread.Sleep(3000);
|
|
||||||
throw new InvalidOperationException($"Failed to launch PowerToys Settings: {ex.Message}\nRunner Path: {locationPath + runnerPath}\nCheck CMD window and Task Manager for details.", ex);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user