【发布时间】:2019-11-22 18:53:53
【问题描述】:
我一直在研究 Scott Chamberlain here 提供的解决方案,将现有调试器附加到 A 启动的进程 B。
在 A 的 ICommand 中,我有这些:
Process.Start(@"C:\...\General.exe", Name);
Application.Current.Shutdown();
B 的DataContext 在视图中设置为Code.cs,如下所示:
<Window.DataContext>
<local:Code/>
</Window.DataContext>
在构造函数中我有这些:
Debugger.Launch();
Name = Environment.GetCommandLineArgs().Skip(1).First();
它会在Possible Debuggers 的GroupBox 中启动 JIT 调试器,但我总是有一个选择:
...的新实例
如何在Possible Debuggers 列表中获取附加到A 的现有调试器?
A 和 B 都在同一个解决方案中。
【问题讨论】:
-
或许你可以试试this extension?
标签: c# wpf visual-studio-debugging child-process