我知道我可以开始在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上一篇:节省时间与并行循环节省、时间
下一篇:编程触发BSODBSOD