Visual Studio debugging Series 1 Debug and Release mode

Debug mode

Debug commonly referred debug version, which contain debugging information, and that no optimization, facilitates the programmer debugger.

Debug Debug mode, see detailed debug message at the breakpoint, as shown below:

Debug and generates a directory in the output executable file and directory:

 

Before commissioning please [solutions] configuration is set to Debug mode. If set to Release mode, Visual Studio project has a separate release and debug configuration for your program. Generated for debugging the debug version and the final release version distributed. Released version optimized for performance, but for better debugging version debugging.

VS debugger, the default is not turned on [enabled "Just My Code"] option.

Release mode

Release commonly referred to as the release version, it is often carried out various optimizations such programs on code size and speed is optimal for the user to make good use of.

Set the mode Release, click [debugging] button, the following window will pop up for the first time:

 

Only select Disable [continue] my code and begin debugging, as shown in the following found several problems:

(1) to hit the breakpoint, but does not display the debugging information on a specific object.

(2) in the Immediate window] [specific information of an object can not be output.

(3) When using a mouse to drag a breakpoint elsewhere, error warning "Unable to set the next statement, because it has been optimized current assembly."

And generating Release directories and files can be run in the output directory:

 If you turn on [enable the "Just My Code"] option, and click again to [debugging]

Program can not hit the breakpoint, run directly and generate output.

 

Guess you like

Origin www.cnblogs.com/SavionZhang/p/11232495.html