I have an application that runs hosted under the "w3wp.exe" process.
While debugging, I often find myself following these steps:
1 - Make some change
2 - Build the project
3 - Attach to "w3wp.exe" using the "attach to process" dialog under the Tools menu.
4 - Perform some action in the application to make my code execute, so I can step through it in the debugger
I'd like to automate step 3 in the post-build script, so that the IDE automatically attaches to the process after the build is completed. Note that I already launch the application as a part of the post-build process, so I can count on the process existing at this point.
Does anyone know a way to automate the "attach to process" command? Something from the command line would be especially nice, but a macro would do, too.
I'm using Visual Studio 2008 under Windows 7, 64 bit.
Edit @InSane basically gave me the right answer, but it does not work because I need to debug managed code, rather than native code. It seems that vsjitdebugger defaults to Native code, and thus my breakpoint is not hit. From inside the IDE, I can specify "managed code" and the debugger attaches as expected. So is there any way to point vsjitdebugger to managed code?