1

This is the first time that I use the release mode in VS, I always used the debug mode and I'm really impressed by how the code can be optimized in release configuration!

But anyway I was surprised that I could still use the "Local Windows Debugger" even in the release configuration, especially because it seems that debug in release mode is not obvious (while in my case I didn't change any option). So my questions are:

  1. Is that normal that the "Debug Information Format" in release mode is set to /ZI? I noticed that if I disable this information no breakpoints work anymore, so maybe I changed it unintentionally.

  2. The code execution in Local Windows Debugger (F5) in release mode is slower is slower "Start without debugging" (CTRL+F5)?

Community
  • 1
  • 1
justHelloWorld
  • 6,478
  • 8
  • 58
  • 138

1 Answers1

0

1) Without any debug information, breakpoints just can't work as there is no way to associate a specific code line with an address in the binary.

(Actually, placing a break point on a specific instruction in the binary will still work, only mapping it back to the source code won't.)

If you lower the debug information format from /ZI to /Zi, further optimizations will be enabled, but in return certain debug features like live editing variable contents already become unavailable. See also https://msdn.microsoft.com/en-us/library/958x11bc.aspx for more details.

2) No, just spawning the debugger usually has no impact on performance.

This is unless actually using break- and trace points, in which at most the first 4 breakpoints are handled in hardware, and all following ones bring an overhead.

Tracing and profiling always causes overhead.

Ext3h
  • 5,713
  • 17
  • 43