You can also add a call.
System.Diagnostics.Debugger.Break();
in code. It pauses the program and then asks you to select the debugger that you want to use. Then you can connect to the executable instance of Visual Studio. If you are already using a debugger, it just breaks as if it hit a breakpoint.
source
share