In the debug properties of my c# project I have selected Start External Program and selected the .exe of the program I wish to attach the debugger to. However, now I need to launch the program from a .bat file not the .exe but VS2005 does not seem to allow this. Is this possible?
EDIT: To clarify, I need to debug the .exe that gets spawned from the .bat. Not debug the .exe launched from “start external program” and also have the .bat execute as well.
Cheers!
Assuming there is no other simple answer, you could use a macro to start and attach to the process. There is a sample macro in the Samples macro project that gets installed with Visual Studio but I’ve pasted a relevant snippet below. Once have a macro to execute the batch file, pause for a bit, then attach to the process – you can add the macro to the Visual Studio toolbar so you can run it with a click.