我要附加到一个进程(a.exe的),只要它是催生,它是可行的与VS?我只知道进程的名称。其实我想要的东西来完成设置在C#代码中设置断点,但代码是属于将由当前运行的应用程序(c.exe)推出另一个可执行文件。该代码是初始化时期内,因此是不可能的,我做手动附加。
I want to attach to a process(a.exe) as soon as it is spawned, is it doable with VS? I only know the name of the process. Actually what I want to accomplish is set a breakpoint in c# code, but the code is belonging to another executable which will be launched by current running application(c.exe). The code is inside the initialize period so it is impossible for me to do the attach manually.
推荐答案在我所面临这个情况之前(我控制这两个进程),我找到了一个体面的解决方法是将调用的 Debugger.Launch()。那么VS会弹出一个对话框,让你附加到该进程。
When I've faced this situation before (and I controlled both processes), I found a decent workaround is to put a call to Debugger.Launch() in the spawning process' entry point. VS will then pop up a dialog box and let you attach to the process.
更多推荐
Visual Studio中:自动附加到一个进程,当该过程产生了
发布评论