Open sean-mcmanus opened 4 years ago
@schtonn Can you provide steps to reproduce this issue?
Can you also share the debug console logs when you enable engine logging by adding the following to your launch.json
?
"logging": {
"engineLogging": true
}
OK,
First, I wrote a matrix struct to calculate the Fibonacci sequence:
Add some breakpoints:
And debug:
When I use step over
, the small yellow arrow disappears, and call stack says: running...
Oh, and where can I find the logs?
You can find the logs in the Debug Console
.
When you step over cin >> m;
the program is waiting on user input. If you type something into your console window does your program continue to hit the next breakpoint?
Oh! How silly I am. But it still does the same thing when it hit t=t*t
.
And these are logs:
=thread-group-added,id="i1"
GNU gdb (GDB) 8.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"
[New Thread 11084.0x521c]
[New Thread 11084.0x309c]
[New Thread 11084.0xe0c]
[New Thread 11084.0x4fdc]
Thread 1 hit Breakpoint 1, main () at c:\Users\liangliang\Desktop\program\Code\Algorithms\matrix.cpp:55
55 cin>>m;
Loaded 'C:\WINDOWS\SYSTEM32\ntdll.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\System32\kernel32.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\System32\KernelBase.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\SYSTEM32\apphelp.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\System32\msvcrt.dll'. Symbols loaded.
Loaded 'C:\MinGW\opt\bin\libgcc_s_dw2-1.dll'. Symbols loaded.
Loaded 'C:\MinGW\opt\bin\libwinpthread-1.dll'. Symbols loaded.
Loaded 'C:\MinGW\bin\libstdc++-6.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\System32\user32.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\System32\win32u.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\System32\gdi32.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\System32\gdi32full.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\System32\msvcp_win.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\System32\ucrtbase.dll'. Symbols loaded.
Loaded 'C:\WINDOWS\SysWOW64\imm32.dll'. Symbols loaded.
Execute debugger commands using "-exec <command>", for example "-exec info registers" will list registers in use (when GDB is the debugger)
[New Thread 11084.0x3394]
Kill the program being debugged? (y or n) [answered Y; input not from terminal]
Oh, and I met another problem recently, that if I redefine the operators, even with
cin
andcout
, it crashes when debugging into or skip(f11 and f10) them. 🤔 😫Originally posted by @schtonn in https://github.com/microsoft/vscode-cpptools/issues/5587#issuecomment-644747828