简体   繁体   English

在 Visual Studio 22 中调试 WPF (C#) 项目时自动附加进程

[英]Automatically Attach Process When Debugging WPF (C#) Project in Visual Studio 22

We have a WPF app with several projects.我们有一个包含多个项目的 WPF 应用程序。 One of the projects is a launcher to start other projects.其中一个项目是启动其他项目的启动器。 It works well, except for debugging.它工作得很好,除了调试。 Since they are different processes, breakpoints do not get hit.由于它们是不同的进程,因此断点不会受到影响。 I have to attach the process manually everytime I launch the debugger.每次启动调试器时,我都必须手动附加该过程。 This is really annoying and a time waster.这真的很烦人,而且很浪费时间。 Is there a way to automatically attach the process when I debug?调试时有没有办法自动附加进程?

Use Microsoft Child Process Debugging Power Tool 2022 ( https://marketplace.visualstudio.com/items?itemName=vsdbgplat.MicrosoftChildProcessDebuggingPowerTool2022 ) extension to automatically attach to child processes.使用 Microsoft Child Process Debugging Power Tool 2022 ( https://marketplace.visualstudio.com/items?itemName=vsdbgplat.MicrosoftChildProcessDebuggingPowerTool2022 ) 扩展来自动附加到子进程。

See additional info here https://devblogs.microsoft.com/devops/introducing-the-child-process-debugging-power-tool/在此处查看其他信息https://devblogs.microsoft.com/devops/introducing-the-child-process-debugging-power-tool/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM