我如何附上一个过程,在Visual Studio中的调试器?过程、调试器、Visual、Studio

2023-09-02 10:36:26 作者:初柚

我知道我可以开始在code进程与的Process.Start()。 是否也可以将调试器附加到该进程?

I know I can start a process in code with Process.Start(). Is it also possible to attach the debugger to that process?

不从code的本身的,而只是一个办法做到这一点?

Not from code per se , but just a way to do it?

推荐答案

您可以连接到正在运行的进程使用工具|附加到进程。如果它是一个Web应用程序,你可以将它通过连接到 ASPNET_WP.EXE 的w3wp.exe

You can attach to a running process using Tools | Attach to Process. If it's a Web Application, you can attach to it by attaching to aspnet_wp.exe or w3wp.exe.

要回答你如何连接到编程过程的问题​​:

To answer your question on how to attach to a process programmatically:

附加到进程的使用VS.NET自动化模型

下面是处理与其他堆栈溢出问题:

Here are other Stack Overflow questions that deal with that:

Communicating与编程的Visual Studio调试? Programmatically在Visual Studio应用断点 Communicating with the Visual Studio Debugger Programmatically? Programmatically apply breakpoints in Visual Studio
 
精彩推荐
图片推荐