I am trying to debug a program using start external program in Visual Studio 2013. All project files are .NET 3.5. As a sidenote: I have debugged like this since i updated to VS2013 (about two weeks), but today it suddently stopped working.
When I run the program it starts, but the Debug->Windows->Modules window is empty.
When I start the program and attach Visual Studio to process with Managed (v3.5, v3.0, v2.0) code everything loads smoothly and I am able to debug. But when I choose Managed (v4.5, v4.0) code I get the same blank modules window as above and no active breakpoints.
Could it be that start external program uses the Managed (v4.5, v4.0) code instead of Managed (v3.5, v3.0, v2.0) code? And is there any way to control which debugger Visual Studio uses when using start external program?
I have double checked that all project that builds with the debug-configuration is set to .NET 3.5 since my first thought was that one of the projects might build in a higher version. One project is .NET4.0 but is not set to build in my configuration.
To bring up the Run and Debug view, select the Run and Debug icon in the Activity Bar on the side of VS Code. You can also use the keyboard shortcut Ctrl+Shift+D. The Run and Debug view displays all information related to running and debugging and has a top bar with debugging commands and configuration settings.
F5 is used to start your project in debug mode and Ctrl-F5 is used to start your project without debug mode.
After some research I ended up adding a .config-file for each version of the executable. The config-file must be named ExecutableNameHere.exe.config.
Here is the config I used for setting the active debugger to .NET 3.5:
<configuration>
<startup>
<supportedRuntime version="v2.0.50727"/>
</startup>
</configuration>
Just save the file in the same directory as the executable and the next time you debug it will use this .NET version.
For other .NET versions, replace version with the following:
Reference: http://msdn.microsoft.com/en-us/library/jj152935(v=vs.110).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With