Currently I am using the newest version: 16.01
So debugging functions like "next line" and breakpoints actually work, just the editor is not showing me anything.
No feedback on which line I am, or any locals or watches.
I assume this could be because the debugger can't find the microsoft symbols.
He does find the pdb of the compiled .exe though ... it seems.
While searching on the board, I found the enviroment variable "_NT_SYMBOL_PATH" mentioned.
So I installed the symbols locally and added the path, just to be safe I also added it in the C::B settings: _NT_SYMBOL_PATH=srv*C:\Symbols*https://msdl.microsoft.com
Here are the logs:
Active debugger config: GDB/CDB debugger:Test
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\cpp\test\Test\
Adding source dir: C:\cpp\test\Test\
Adding file: C:\cpp\test\Test\bin\Debug\Test.exe
Changing directory to: C:/cpp/test/Test/.
Set variable: PATH=.;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0
Starting debugger: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe -G -lines -2 -y C:/cpp/test/Test/; -srcpath C:/cpp/test/Test/; C:/cpp/test/Test/bin/Debug/Test.exe
done
Setting breakpoints
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\kernel32.dll -
*** WARNING: Unable to verify checksum for Test.exe
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\ucrtbased.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\MSVCP140D.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\VCRUNTIME140D.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-file-l1-2-0.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-processthreads-l1-1-1.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-localization-l1-2-0.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-file-l2-1-0.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-timezone-l1-1-0.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-synch-l1-2-0.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\KERNELBASE.dll -
Breakpoint 1 hit
EDIT:
Just to make sure I tried it with the newest Nightly build provided in the board, 11146, exact same result.
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\cpp\test\Test\
Adding source dir: C:\cpp\test\Test\
Adding file: C:\cpp\test\Test\bin\Debug\Test.exe
Changing directory to: C:/cpp/test/Test/.
Set variable: PATH=.;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0
[debug]Command-line: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe -G -lines -2 -y C:/cpp/test/Test/; -srcpath C:/cpp/test/Test/; C:/cpp/test/Test/bin/Debug/Test.exe
[debug]Working dir : C:\cpp\test\Test
Starting debugger: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe -G -lines -2 -y C:/cpp/test/Test/; -srcpath C:/cpp/test/Test/; C:/cpp/test/Test/bin/Debug/Test.exe
done
Setting breakpoints
[debug]Microsoft (R) Windows Debugger Version 10.0.15063.400 AMD64
[debug]Copyright (c) Microsoft Corporation. All rights reserved.
[debug]CommandLine: C:/cpp/test/Test/bin/Debug/Test.exe
[debug]************* Symbol Path validation summary **************
[debug]Response Time (ms) Location
[debug]OK C:/cpp/test/Test/
[debug]Deferred srv*C:\Symbols*https://msdl.microsoft.com
[debug]Symbol search path is: C:/cpp/test/Test/;srv*C:\Symbols*https://msdl.microsoft.com
[debug]Executable search path is:
[debug]ModLoad: 00000001`3f240000 00000001`3f252000 Test.exe
[debug]ModLoad: 00000000`77710000 00000000`778ba000 ntdll.dll
[debug]ModLoad: 00000000`774f0000 00000000`7760f000 C:\Windows\system32\kernel32.dll
[debug]ModLoad: 000007fe`fd5e0000 000007fe`fd64a000 C:\Windows\system32\KERNELBASE.dll
[debug]ModLoad: 000007fe`ef670000 000007fe`ef761000 C:\Windows\system32\MSVCP140D.dll
[debug]ModLoad: 000007fe`effd0000 000007fe`efff1000 C:\Windows\system32\VCRUNTIME140D.dll
[debug]ModLoad: 000007fe`ec990000 000007fe`ecb48000 C:\Windows\system32\ucrtbased.dll
[debug]ModLoad: 000007fe`f66c0000 000007fe`f66c3000 C:\Windows\system32\api-ms-win-core-timezone-l1-1-0.dll
[debug]ModLoad: 000007fe`f6640000 000007fe`f6643000 C:\Windows\system32\api-ms-win-core-file-l2-1-0.dll
[debug]ModLoad: 000007fe`f3b30000 000007fe`f3b33000 C:\Windows\system32\api-ms-win-core-localization-l1-2-0.dll
[debug]ModLoad: 000007fe`f80d0000 000007fe`f80d3000 C:\Windows\system32\api-ms-win-core-synch-l1-2-0.dll
[debug]ModLoad: 000007fe`f3b20000 000007fe`f3b23000 C:\Windows\system32\api-ms-win-core-processthreads-l1-1-1.dll
[debug]ModLoad: 000007fe`f3280000 000007fe`f3283000 C:\Windows\system32\api-ms-win-core-file-l1-2-0.dll
[debug](db90.db40): Break instruction exception - code 80000003 (first chance)
[debug]*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
[debug]ntdll!CsrSetPriorityClass+0x40:
[debug]00000000`777b7980 cc int 3
[debug]0:000>
[debug]> |.
[debug]. 0 id: db90 create name: Test.exe
[debug]0:000>
[debug]> bc *
[debug]0:000>
[debug]> bu1 `C:/cpp/test/Test/main.cpp:8`
[debug]*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\kernel32.dll -
[debug]*** WARNING: Unable to verify checksum for Test.exe
[debug]*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\ucrtbased.dll -
[debug]*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\MSVCP140D.dll -
[debug]*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\VCRUNTIME140D.dll -
[debug]*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-file-l1-2-0.dll -
[debug]*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-processthreads-l1-1-1.dll -
[debug]*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-localization-l1-2-0.dll -
[debug]*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-file-l2-1-0.dll -
[debug]*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-timezone-l1-1-0.dll -
[debug]*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-synch-l1-2-0.dll -
[debug]*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\KERNELBASE.dll -
[debug]0:000>
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\kernel32.dll -
*** WARNING: Unable to verify checksum for Test.exe
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\ucrtbased.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\MSVCP140D.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\VCRUNTIME140D.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-file-l1-2-0.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-processthreads-l1-1-1.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-localization-l1-2-0.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-file-l2-1-0.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-timezone-l1-1-0.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\api-ms-win-core-synch-l1-2-0.dll -
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Windows\system32\KERNELBASE.dll -
[debug]> l+t
[debug]Source options are 1:
[debug] 1/t - Step/trace by source line
[debug]0:000>
[debug]> l+s
[debug]Source options are 5:
[debug] 1/t - Step/trace by source line
[debug] 4/s - List source code at prompt
[debug]0:000>
[debug]> l+o
[debug]Source options are d:
[debug] 1/t - Step/trace by source line
[debug] 4/s - List source code at prompt
[debug] 8/o - Only show source code at prompt
[debug]0:000>
[debug]> g
[debug]Breakpoint 1 hit
[debug]> 8: cout << "Hello world!" << endl;
[debug]0:000>
[debug]> k n
Breakpoint 1 hit
[debug] # Child-SP RetAddr Call Site
[debug]00 00000000`0030fda0 00000001`3f242fb4 Test!main+0x22 [C:\cpp\test\Test\main.cpp @ 8]
[debug]01 00000000`0030fdf0 00000001`3f242e67 Test!invoke_main+0x34 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 79]
[debug]02 00000000`0030fe30 00000001`3f242d2e Test!__scrt_common_main_seh+0x127 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 283]
[debug]03 00000000`0030fe90 00000001`3f243049 Test!__scrt_common_main+0xe [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 326]
[debug]04 00000000`0030fec0 00000000`775059cd Test!mainCRTStartup+0x9 [f:\dd\vctools\crt\vcstartup\src\startup\exe_main.cpp @ 17]
[debug]05 00000000`0030fef0 00000000`7773a561 kernel32!BaseThreadInitThunk+0xd
[debug]06 00000000`0030ff20 00000000`00000000 ntdll!RtlUserThreadStart+0x21
[debug]0:000>
[debug]> k n
[debug] # Child-SP RetAddr Call Site
[debug]00 00000000`0030fda0 00000001`3f242fb4 Test!main+0x22 [C:\cpp\test\Test\main.cpp @ 8]
[debug]01 00000000`0030fdf0 00000001`3f242e67 Test!invoke_main+0x34 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 79]
[debug]02 00000000`0030fe30 00000001`3f242d2e Test!__scrt_common_main_seh+0x127 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 283]
[debug]03 00000000`0030fe90 00000001`3f243049 Test!__scrt_common_main+0xe [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 326]
[debug]04 00000000`0030fec0 00000000`775059cd Test!mainCRTStartup+0x9 [f:\dd\vctools\crt\vcstartup\src\startup\exe_main.cpp @ 17]
[debug]05 00000000`0030fef0 00000000`7773a561 kernel32!BaseThreadInitThunk+0xd
[debug]06 00000000`0030ff20 00000000`00000000 ntdll!RtlUserThreadStart+0x21
[debug]0:000>
I found the error ... somehow I skipped half of the path to the microsoft debug symbol server, I fixed it.
But there is still no debug feedback.
This is the newest log:
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\cpp\test\Test\
Adding source dir: C:\cpp\test\Test\
Adding file: C:\cpp\test\Test\bin\Debug\Test.exe
Changing directory to: C:/cpp/test/Test/.
Set variable: PATH=.;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;C:\Program Files (x86)\Windows Kits\8.1\bin\x86;C:\Program Files (x86)\Windows Kits\8.1\bin\x64;C:\Program Files (x86)\Windows Kits\10\bin\x86;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0
[debug]Command-line: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe -G -lines -2 -y C:/cpp/test/Test/; -srcpath C:/cpp/test/Test/; C:/cpp/test/Test/bin/Debug/Test.exe
[debug]Working dir : C:\cpp\test\Test
Starting debugger: C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\cdb.exe -G -lines -2 -y C:/cpp/test/Test/; -srcpath C:/cpp/test/Test/; C:/cpp/test/Test/bin/Debug/Test.exe
done
Setting breakpoints
[debug]Microsoft (R) Windows Debugger Version 10.0.15063.400 AMD64
[debug]Copyright (c) Microsoft Corporation. All rights reserved.
[debug]CommandLine: C:/cpp/test/Test/bin/Debug/Test.exe
[debug]************* Symbol Path validation summary **************
[debug]Response Time (ms) Location
[debug]OK C:/cpp/test/Test/
[debug]Deferred srv*C:\Symbols*https://msdl.microsoft.com/download/symbols
[debug]Symbol search path is: C:/cpp/test/Test/;srv*C:\Symbols*https://msdl.microsoft.com/download/symbols
[debug]Executable search path is:
[debug]ModLoad: 00000001`3f210000 00000001`3f222000 Test.exe
[debug]ModLoad: 00000000`77710000 00000000`778ba000 ntdll.dll
[debug]ModLoad: 00000000`774f0000 00000000`7760f000 C:\Windows\system32\kernel32.dll
[debug]ModLoad: 000007fe`fd5e0000 000007fe`fd64a000 C:\Windows\system32\KERNELBASE.dll
[debug]ModLoad: 000007fe`ef670000 000007fe`ef761000 C:\Windows\system32\MSVCP140D.dll
[debug]ModLoad: 000007fe`effd0000 000007fe`efff1000 C:\Windows\system32\VCRUNTIME140D.dll
[debug]ModLoad: 000007fe`ec990000 000007fe`ecb48000 C:\Windows\system32\ucrtbased.dll
[debug]ModLoad: 000007fe`f66c0000 000007fe`f66c3000 C:\Windows\system32\api-ms-win-core-timezone-l1-1-0.dll
[debug]ModLoad: 000007fe`f6640000 000007fe`f6643000 C:\Windows\system32\api-ms-win-core-file-l2-1-0.dll
[debug]ModLoad: 000007fe`f3b30000 000007fe`f3b33000 C:\Windows\system32\api-ms-win-core-localization-l1-2-0.dll
[debug]ModLoad: 000007fe`f80d0000 000007fe`f80d3000 C:\Windows\system32\api-ms-win-core-synch-l1-2-0.dll
[debug]ModLoad: 000007fe`f3b20000 000007fe`f3b23000 C:\Windows\system32\api-ms-win-core-processthreads-l1-1-1.dll
[debug]ModLoad: 000007fe`f3280000 000007fe`f3283000 C:\Windows\system32\api-ms-win-core-file-l1-2-0.dll
[debug](d4a0.c43c): Break instruction exception - code 80000003 (first chance)
[debug]ntdll!LdrpDoDebuggerBreak+0x30:
[debug]00000000`777b7980 cc int 3
[debug]0:000>
[debug]> |.
[debug]. 0 id: d4a0 create name: Test.exe
[debug]0:000>
[debug]> bc *
[debug]0:000>
[debug]> bu1 `C:/cpp/test/Test/main.cpp:8`
[debug]*** WARNING: Unable to verify checksum for Test.exe
[debug]0:000>
*** WARNING: Unable to verify checksum for Test.exe
[debug]> l+t
[debug]Source options are 1:
[debug] 1/t - Step/trace by source line
[debug]0:000>
[debug]> l+s
[debug]Source options are 5:
[debug] 1/t - Step/trace by source line
[debug] 4/s - List source code at prompt
[debug]0:000>
[debug]> l+o
[debug]Source options are d:
[debug] 1/t - Step/trace by source line
[debug] 4/s - List source code at prompt
[debug] 8/o - Only show source code at prompt
[debug]0:000>
[debug]> g
[debug]Breakpoint 1 hit
[debug]> 8: cout << "Hello world!" << endl;
[debug]0:000>
[debug]> k n
Breakpoint 1 hit
[debug] # Child-SP RetAddr Call Site
[debug]00 00000000`0022fd60 00000001`3f212fb4 Test!main+0x22 [C:\cpp\test\Test\main.cpp @ 8]
[debug]01 00000000`0022fdb0 00000001`3f212e67 Test!invoke_main+0x34 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 79]
[debug]02 00000000`0022fdf0 00000001`3f212d2e Test!__scrt_common_main_seh+0x127 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 283]
[debug]03 00000000`0022fe50 00000001`3f213049 Test!__scrt_common_main+0xe [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 326]
[debug]04 00000000`0022fe80 00000000`775059cd Test!mainCRTStartup+0x9 [f:\dd\vctools\crt\vcstartup\src\startup\exe_main.cpp @ 17]
[debug]05 00000000`0022feb0 00000000`7773a561 kernel32!BaseThreadInitThunk+0xd
[debug]06 00000000`0022fee0 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
[debug]0:000>
[debug]> k n
[debug] # Child-SP RetAddr Call Site
[debug]00 00000000`0022fd60 00000001`3f212fb4 Test!main+0x22 [C:\cpp\test\Test\main.cpp @ 8]
[debug]01 00000000`0022fdb0 00000001`3f212e67 Test!invoke_main+0x34 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 79]
[debug]02 00000000`0022fdf0 00000001`3f212d2e Test!__scrt_common_main_seh+0x127 [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 283]
[debug]03 00000000`0022fe50 00000001`3f213049 Test!__scrt_common_main+0xe [f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl @ 326]
[debug]04 00000000`0022fe80 00000000`775059cd Test!mainCRTStartup+0x9 [f:\dd\vctools\crt\vcstartup\src\startup\exe_main.cpp @ 17]
[debug]05 00000000`0022feb0 00000000`7773a561 kernel32!BaseThreadInitThunk+0xd
[debug]06 00000000`0022fee0 00000000`00000000 ntdll!RtlUserThreadStart+0x1d
[debug]0:000>
Only error I can see is this:
[debug]*** WARNING: Unable to verify checksum for Test.exe