Debugging .net code, allowing you to execute source code while it is being executed, usually requires three things:
- Symbols (associated .pdb file) that were created with the .dll or .exe assembly
- Source (related .cs, .vb files, etc.)
- Executable machine code must not be optimized
Characters controlled by / debug: {full | pdbonly} . If you specify /debug:full
(even in the release build, when disabling compiler optimization), you can connect to an already running process and execute the code. If you have /debug:pdbonly
, you must use the debugger to run the program (and cannot see the characters when connecting to an already running process).
Optimization is controlled by the / debug option, but can be further controlled by / optimize- .
source share