Which process to attach to debug the .NET winforms exe in visual studio 2008

I am using visual studio 2008 (32 bit. My machine is 64 bit). I've build an windows forms EXE application. Now I want to attach the process in visual studio so that when I run the EXE from Debug/Release folder of my project it should hit the breakpoints that I've set in my code which is currently opened in visual studio 2008.

I can see there is a process called MyApplicationName.vshost.exe but the attach button is grayed out.

The reason I wnat to debug the EXE is, I want to debug the EXE at run time. I am getting an exception when I run the EXE from Debug/Release folder but when I run through the code I didn't get any exception

Please let me know which process should I attache in VS2008 so that when I run my EXE from Debug/Release folder of my project it should hit the breakpoints that I've set in my code which is currently opened in visual studio 2008.


If you have the source code, I also suggest you debug your app directly, you could use the Exception throw under Debug->Exceptions window which could help you throw the Exception messages.

For host process, if possible, you could disable it under project property:

在这里输入图像描述

If you have to use the attach to process, please run VS as the admin, and then attach to your process directly:

在这里输入图像描述

链接地址: http://www.djcxy.com/p/17088.html

上一篇: jQuery提示和技巧

下一篇: 在Visual Studio 2008中附加调试.NET winforms exe的过程