Type: Debugger
Describe the bug
Operating System: Ubuntu 18.04.1 LTS
Kernel: Linux 4.15.0-36-generic
Architecture: x86-64
Версия: 1.28.1
Фиксация: 3368db6750222d319c851f6d90eb619d886e08f5
Дата: 2018-10-11T18:09:20.566Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Архитектура: x64:
Version 0.19.0
When i set breakpoints - they are ignored by debugger.
To Reproduce
Steps to reproduce the behavior:
launch.json:
{
// Используйте IntelliSense, чтобы узнать о возможных атрибутах.
// Наведите указатель мыши, чтобы просмотреть описания существующих атрибутов.
// Для получения дополнительной информации посетите: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/main",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"logging": { "trace": true, "traceResponse": true },
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
Addition debug output:
E output: {"category":"telemetry","output":"VS/Diagnostics/Debugger/Launch","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"14.0.50814.1","VS.Diagnostics.Debugger.HostVersion":"14.0.50814.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.Launch.Duration":2735,"VS.Diagnostics.Debugger.Launch.IsCoreDump":false,"VS.Diagnostics.Debugger.VisualizerFileUsed":false,"VS.Diagnostics.Debugger.SourceFileMappings":0},"type":"output"}
R: {"success":true,"message":null,"request_seq":2,"command":"launch","body":null,"running":false,"refs":null,"seq":0,"type":"response"}
E initialized: {"type":"initialized"}
C setBreakpoints: {"source":{"name":"main.c","path":"/home/ep4sh/Documents/my/cLang/foo/main.c"},"lines":[6,15],"breakpoints":[{"line":6},{"line":15}],"sourceModified":false}
R: {"success":true,"message":null,"request_seq":3,"command":"setBreakpoints","body":{"breakpoints":[{"id":1,"verified":true,"line":6,"message":null},{"id":2,"verified":true,"line":15,"message":null}]},"running":false,"refs":null,"seq":0,"type":"response"}
E breakpoint: {"reason":"changed","breakpoint":{"id":1,"verified":false,"line":6,"message":"Module containing this breakpoint has not yet loaded or the breakpoint address could not be obtained."},"type":"breakpoint"}
E breakpoint: {"reason":"changed","breakpoint":{"id":2,"verified":false,"line":15,"message":"Module containing this breakpoint has not yet loaded or the breakpoint address could not be obtained."},"type":"breakpoint"}
C setFunctionBreakpoints: {"breakpoints":[]}
R: {"success":true,"message":null,"request_seq":4,"command":"setFunctionBreakpoints","body":{"breakpoints":[]},"running":false,"refs":null,"seq":0,"type":"response"}
C setExceptionBreakpoints: {"filters":[]}
R: {"success":true,"message":null,"request_seq":5,"command":"setExceptionBreakpoints","body":{},"running":false,"refs":null,"seq":0,"type":"response"}
C configurationDone: null
R: {"success":true,"message":null,"request_seq":6,"command":"configurationDone","body":null,"running":false,"refs":null,"seq":0,"type":"response"}
E output: {"category":"stdout","output":"=thread-group-added,id=\"i1\"\nGNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git\nCopyright (C) 2018 Free Software Foundation, Inc.\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law. Type \"show copying\"\nand \"show warranty\" for details.\nThis GDB was configured as \"x86_64-linux-gnu\".\nType \"show configuration\" for configuration details.\nFor bug reporting instructions, please see:\n<http://www.gnu.org/software/gdb/bugs/>.\nFind the GDB manual and other documentation resources online at:\n<http://www.gnu.org/software/gdb/documentation/>.\nFor help, type \"help\".\nType \"apropos word\" to search for commands related to \"word\".\nWarning: Debuggee TargetArchitecture not detected, assuming x86_64.\n=cmd-param-changed,param=\"pagination\",value=\"off\"\n","data":null,"type":"output"}
=thread-group-added,id="i1"
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
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 "x86_64-linux-gnu".
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"
C threads: null
R: {"success":true,"message":null,"request_seq":7,"command":"threads","body":{"threads":[]},"running":false,"refs":null,"seq":0,"type":"response"}
E thread: {"reason":"started","threadId":24063,"type":"thread"}
E output: {"category":"stdout","output":"Stopped due to shared library event (no libraries added or removed)\n","data":null,"type":"output"}
Stopped due to shared library event (no libraries added or removed)
E output: {"category":"console","output":"Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.\n","data":null,"type":"output"}
Loaded '/lib64/ld-linux-x86-64.so.2'. Symbols loaded.
C threads: null
R: {"success":true,"message":null,"request_seq":8,"command":"threads","body":{"threads":[{"id":24063,"name":"main"}]},"running":false,"refs":null,"seq":0,"type":"response"}
E output: {"category":"stdout","output":"\n","data":null,"type":"output"}
E output: {"category":"stdout","output":"Breakpoint 1, 0x000055555555467a in main ()\n","data":null,"type":"output"}
Breakpoint 1, 0x000055555555467a in main ()
E output: {"category":"stdout","output":"[Inferior 1 (process 24063) exited normally]\n","data":null,"type":"output"}
[Inferior 1 (process 24063) exited normally]
E thread: {"reason":"exited","threadId":24063,"type":"thread"}
E output: {"category":"console","output":"The program '/home/ep4sh/Documents/my/cLang/foo/main' has exited with code 0 (0x00000000).\r\n\n","data":null,"type":"output"}
The program '/home/ep4sh/Documents/my/cLang/foo/main' has exited with code 0 (0x00000000).
E exited: {"exitCode":0,"type":"exited"}
E terminated: {"type":"terminated"}
E output: {"category":"telemetry","output":"VS/Diagnostics/Debugger/DebugCompleted","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"14.0.50814.1","VS.Diagnostics.Debugger.HostVersion":"14.0.50814.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.DebugCompleted.BreakCounter":0},"type":"output"}
C disconnect: {"restart":false}
R: {"success":true,"message":null,"request_seq":9,"command":"disconnect","body":null,"running":false,"refs":null,"seq":0,"type":"response"}
E output: {"category":"stdout","output":"Breakpoint 1, 0x000055555555467a in main ()\n","data":null,"type":"output"}
Breakpoint 1, 0x000055555555467a in main ()
It looks like the debugger could not find symbols. Did you compile with the -g
flag?
Most helpful comment
It looks like the debugger could not find symbols. Did you compile with the
-g
flag?