Visual C ++ - Why worry about debugging mode?

So, I just followed a tip that allows you to use debug symbols for release mode, and after turning on debug symbols, turning off optimizations and finding that breakpoints work if the symbols performed release mode, I wonder ...

  • Isn't the purpose of Debug mode to help you find bugs?
  • Why worry about debug mode if it skips errors?

Any tips?

+3
source share
7 answers

" ". , , . , .

. MSVC .

, , assert NDEBUG, , , .

+8

, . . - .

, , , .

, , .

, . , " ?" , .

+16

, ( ). , assert() ..

+3

, , MSVC , .

, , . , MSVC, . .

+3

- ; , , volatile, ( ).

, , .

, :

  • , assert(), .
  • , . Infact, ( volatile) : , .
+1

( ..).

" PDB" ( , ) . .

( ) ( n, n + 2, n + 1...).

+1

- .

for (int i = 0; i < 10; i++)
{
  //use i with something
}

i 0 . ,

0

Source: https://habr.com/ru/post/1716283/


All Articles