C code, doesnt wants to debbug, it just runs. #586
Unanswered
yoshijulas
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
FIXED: Added -g when using clang/gcc
I tried to instal this extension to debug my C code
Its worked fine the first time, but now its not working
I compile my code with clang, even tried with gcc, but the results are the same
I closed the vscode, i opened again and worked, but when i compile it, its stopped working again
And now it isnt working anymore, and i dont know what is the issue
This are the logs:
and this is the "issue": [2021-11-25T04:16:48.516Z ERROR codelldb::debug_session] Internal debugger error: Invalid thread id.
configuration: { type: 'lldb', request: 'launch', name: 'Launch', program: '${workspaceFolder}/${fileBasenameNoExtension}.exe', args: [], cwd: '${workspaceFolder}', stopOnEntry: true, __configurationTarget: 5, relativePathBase: 'c:\\Users\\yoshi\\Documents\\c' } liblldb: c:\Users\yoshi\.vscode-insiders\extensions\vadimcn.vscode-lldb-1.6.10\lldb\bin\liblldb.dll environment: {} params: { evaluateForHovers: true, commandCompletions: true } Listening on port 56720 [2021-11-25T04:16:46.983Z DEBUG codelldb] New debug session INFO(Python) 22:16:47 formatters: Initializing INFO(Python) 22:16:47 formatters.rust: Initializing [2021-11-25T04:16:47.947Z DEBUG codelldb::dap_codec] --> {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code - Insiders","adapterID":"lldb","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request","seq":1} [2021-11-25T04:16:47.948Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"exceptionBreakpointFilters":[{"default":true,"filter":"cpp_throw","label":"C++: on throw"},{"default":false,"filter":"cpp_catch","label":"C++: on catch"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsFunctionBreakpoints":true,"supportsGotoTargetsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsReadMemoryRequest":true,"supportsRestartFrame":true,"supportsSetVariable":true}} [2021-11-25T04:16:47.970Z DEBUG codelldb::dap_codec] --> {"command":"launch","arguments":{"type":"lldb","request":"launch","name":"Launch","program":"C:\\Users\\yoshi\\Documents\\c/19.exe","args":[],"cwd":"C:\\Users\\yoshi\\Documents\\c","stopOnEntry":true,"__configurationTarget":5,"relativePathBase":"c:\\Users\\yoshi\\Documents\\c","_adapterSettings":{"displayFormat":"auto","showDisassembly":"auto","dereferencePointers":true,"suppressMissingSourceFiles":true,"evaluationTimeout":5,"consoleMode":"commands","sourceLanguages":null,"terminalPromptClear":null,"evaluateForHovers":true,"commandCompletions":true,"reproducer":false},"__sessionId":"4c1bcd65-1780-4b19-9f86-6fc2ffc62e77"},"type":"request","seq":2} [2021-11-25T04:16:47.970Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":1,"event":"capabilities","body":{"capabilities":{"exceptionBreakpointFilters":[{"default":true,"filter":"cpp_throw","label":"C++: on throw"},{"default":false,"filter":"cpp_catch","label":"C++: on catch"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsFunctionBreakpoints":true,"supportsGotoTargetsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsReadMemoryRequest":true,"supportsRestartFrame":true,"supportsSetVariable":true}}} [2021-11-25T04:16:48.021Z DEBUG codelldb::debug_session] Debug event: 000002022C1D32E0 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000002 (modules-loaded), data = {19.exe} [2021-11-25T04:16:48.021Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":2,"event":"initialized"} [2021-11-25T04:16:48.021Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":3,"event":"module","body":{"module":{"addressRange":"FFFFFFFFFFFFFFFF","id":"FFFFFFFFFFFFFFFF","name":"19.exe","path":"C:\\Users\\yoshi\\Documents\\c\\19.exe","symbolFilePath":"C:\\Users\\yoshi\\Documents\\c\\19.exe","symbolStatus":"Symbols loaded."},"reason":"new"}} [2021-11-25T04:16:48.021Z DEBUG codelldb::dap_codec] <-- {"type":"request","seq":4,"command":"runInTerminal","arguments":{"args":["c:\\Users\\yoshi\\.vscode-insiders\\extensions\\vadimcn.vscode-lldb-1.6.10\\adapter\\codelldb.exe","terminal-agent","--port=56723"],"cwd":"","kind":"integrated","title":"Launch"}} [2021-11-25T04:16:48.030Z DEBUG codelldb::dap_codec] --> {"command":"setBreakpoints","arguments":{"source":{"name":"19.c","path":"c:\\Users\\yoshi\\Documents\\c\\19.c"},"lines":[41],"breakpoints":[{"line":41}],"sourceModified":false},"type":"request","seq":3} [2021-11-25T04:16:48.032Z DEBUG codelldb::debug_session] Debug event: 000002022C1D3DE0 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {} [2021-11-25T04:16:48.032Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":3,"success":true,"command":"setBreakpoints","body":{"breakpoints":[{"id":1,"message":"Resolved locations: 0","verified":false}]}} [2021-11-25T04:16:48.042Z DEBUG codelldb::dap_codec] --> {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":4} [2021-11-25T04:16:48.042Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":4,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]}} [2021-11-25T04:16:48.049Z DEBUG codelldb::dap_codec] --> {"type":"response","seq":5,"command":"runInTerminal","request_seq":4,"success":true,"body":{"shellProcessId":48024}} [2021-11-25T04:16:48.054Z DEBUG codelldb::dap_codec] --> {"command":"setDataBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":6} [2021-11-25T04:16:48.054Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":6,"success":true,"command":"setDataBreakpoints","body":{"breakpoints":[]}} [2021-11-25T04:16:48.068Z DEBUG codelldb::dap_codec] --> {"command":"setExceptionBreakpoints","arguments":{"filters":["cpp_throw","cpp_catch"]},"type":"request","seq":7} [2021-11-25T04:16:48.068Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":7,"success":true,"command":"setExceptionBreakpoints"} [2021-11-25T04:16:48.068Z DEBUG codelldb::debug_session] Debug event: 000002022C1D55E0 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {} [2021-11-25T04:16:48.075Z DEBUG codelldb::dap_codec] --> {"command":"configurationDone","type":"request","seq":8} [2021-11-25T04:16:48.076Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":8,"success":true,"command":"configurationDone"} [2021-11-25T04:16:48.089Z DEBUG codelldb::dap_codec] --> {"command":"threads","type":"request","seq":9} [2021-11-25T04:16:48.089Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":9,"success":true,"command":"threads","body":{"threads":[]}} [2021-11-25T04:16:48.172Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":5,"event":"output","body":{"output":"Launching: C:\\Users\\yoshi\\Documents\\c\\19.exe\n"}} [adapter\src\terminal.rs:104] FreeConsole() = 1 [adapter\src\terminal.rs:105] AttachConsole(pid) = 1 [adapter\src\terminal.rs:109] FreeConsole() = 1 [2021-11-25T04:16:48.416Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":6,"event":"output","body":{"output":"Launched process 38900\n"}} [2021-11-25T04:16:48.416Z DEBUG codelldb::debug_session] Debug event: 000002022C1776F0 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000002 (modules-loaded), data = {19.exe} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":7,"event":"stopped","body":{"allThreadsStopped":true,"reason":"unknown"}} [2021-11-25T04:16:48.417Z DEBUG codelldb::debug_session] Debug event: 000002022C1772F0 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000002 (modules-loaded), data = {ntdll.dll} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":2,"success":true,"command":"launch"} [2021-11-25T04:16:48.417Z DEBUG codelldb::debug_session] Debug event: 000002022C1774B0 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000002 (modules-loaded), data = {ntdll.dll} [2021-11-25T04:16:48.417Z DEBUG codelldb::debug_session] Debug event: 000002022C1779B0 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000002 (modules-loaded), data = {hmpalert.dll} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":8,"event":"module","body":{"module":{"addressRange":"7FF6DFD00000","id":"7FF6DFD00000","name":"19.exe","path":"C:\\Users\\yoshi\\Documents\\c\\19.exe","symbolFilePath":"C:\\Users\\yoshi\\Documents\\c\\19.exe","symbolStatus":"Symbols loaded."},"reason":"new"}} [2021-11-25T04:16:48.417Z DEBUG codelldb::debug_session] Debug event: 000002022C178A70 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000002 (modules-loaded), data = {hmpalert.dll} [2021-11-25T04:16:48.417Z DEBUG codelldb::debug_session] Debug event: 000002022C177DF0 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000002 (modules-loaded), data = {kernel32.dll} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":9,"event":"module","body":{"module":{"addressRange":"7FF91B200000","id":"7FF91B200000","name":"ntdll.dll","path":"C:\\Windows\\System32\\ntdll.dll","symbolFilePath":"C:\\Windows\\System32\\ntdll.dll","symbolStatus":"Symbols loaded."},"reason":"new"}} [2021-11-25T04:16:48.417Z DEBUG codelldb::debug_session] Debug event: 000002022C1789F0 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000002 (modules-loaded), data = {kernel32.dll} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":10,"event":"module","body":{"module":{"addressRange":"7FF91B200000","id":"7FF91B200000","name":"ntdll.dll","path":"C:\\Windows\\System32\\ntdll.dll","symbolFilePath":"C:\\Windows\\System32\\ntdll.dll","symbolStatus":"Symbols loaded."},"reason":"new"}} [2021-11-25T04:16:48.417Z DEBUG codelldb::debug_session] Debug event: 000002022C178BF0 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000002 (modules-loaded), data = {KernelBase.dll} [2021-11-25T04:16:48.417Z DEBUG codelldb::debug_session] Debug event: 000002022C178430 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000002 (modules-loaded), data = {KernelBase.dll} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":11,"event":"module","body":{"module":{"addressRange":"7FF9184C0000","id":"7FF9184C0000","name":"hmpalert.dll","path":"C:\\Windows\\System32\\hmpalert.dll","symbolFilePath":"C:\\Windows\\System32\\hmpalert.dll","symbolStatus":"Symbols loaded."},"reason":"new"}} [2021-11-25T04:16:48.417Z DEBUG codelldb::debug_session] Debug event: 000002022C1783F0 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000002 (modules-loaded), data = {ucrtbase.dll} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":12,"event":"module","body":{"module":{"addressRange":"7FF9184C0000","id":"7FF9184C0000","name":"hmpalert.dll","path":"C:\\Windows\\System32\\hmpalert.dll","symbolFilePath":"C:\\Windows\\System32\\hmpalert.dll","symbolStatus":"Symbols loaded."},"reason":"new"}} [2021-11-25T04:16:48.417Z DEBUG codelldb::debug_session] Debug event: 000002022C1784B0 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000002 (modules-loaded), data = {ucrtbase.dll} [2021-11-25T04:16:48.417Z DEBUG codelldb::debug_session] Debug event: 000002022C1787B0 Event: broadcaster = 000002022CE4C6D8 (lldb.target), type = 0x00000002 (modules-loaded), data = {19.exe} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":13,"event":"module","body":{"module":{"addressRange":"7FF919F50000","id":"7FF919F50000","name":"kernel32.dll","path":"C:\\Windows\\System32\\kernel32.dll","symbolFilePath":"C:\\Windows\\System32\\kernel32.dll","symbolStatus":"Symbols loaded."},"reason":"new"}} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":14,"event":"module","body":{"module":{"addressRange":"7FF919F50000","id":"7FF919F50000","name":"kernel32.dll","path":"C:\\Windows\\System32\\kernel32.dll","symbolFilePath":"C:\\Windows\\System32\\kernel32.dll","symbolStatus":"Symbols loaded."},"reason":"new"}} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":15,"event":"module","body":{"module":{"addressRange":"7FF918820000","id":"7FF918820000","name":"KernelBase.dll","path":"C:\\Windows\\System32\\KernelBase.dll","symbolFilePath":"C:\\Windows\\System32\\KernelBase.dll","symbolStatus":"Symbols loaded."},"reason":"new"}} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":16,"event":"module","body":{"module":{"addressRange":"7FF918820000","id":"7FF918820000","name":"KernelBase.dll","path":"C:\\Windows\\System32\\KernelBase.dll","symbolFilePath":"C:\\Windows\\System32\\KernelBase.dll","symbolStatus":"Symbols loaded."},"reason":"new"}} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":17,"event":"module","body":{"module":{"addressRange":"7FF918DC0000","id":"7FF918DC0000","name":"ucrtbase.dll","path":"C:\\Windows\\System32\\ucrtbase.dll","symbolFilePath":"C:\\Windows\\System32\\ucrtbase.dll","symbolStatus":"Symbols loaded."},"reason":"new"}} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":18,"event":"module","body":{"module":{"addressRange":"7FF918DC0000","id":"7FF918DC0000","name":"ucrtbase.dll","path":"C:\\Windows\\System32\\ucrtbase.dll","symbolFilePath":"C:\\Windows\\System32\\ucrtbase.dll","symbolStatus":"Symbols loaded."},"reason":"new"}} [2021-11-25T04:16:48.417Z DEBUG codelldb::dap_codec] <-- {"type":"event","seq":19,"event":"module","body":{"module":{"addressRange":"7FF6DFD00000","id":"7FF6DFD00000","name":"19.exe","path":"C:\\Users\\yoshi\\Documents\\c\\19.exe","symbolFilePath":"C:\\Users\\yoshi\\Documents\\c\\19.exe","symbolStatus":"Symbols loaded."},"reason":"new"}} [2021-11-25T04:16:48.420Z DEBUG codelldb::dap_codec] --> {"command":"threads","type":"request","seq":10} [2021-11-25T04:16:48.420Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":10,"success":true,"command":"threads","body":{"threads":[{"id":47304,"name":"1: tid=47304"}]}} [2021-11-25T04:16:48.516Z DEBUG codelldb::dap_codec] --> {"command":"stackTrace","arguments":{"threadId":47304,"startFrame":0,"levels":20},"type":"request","seq":11} [2021-11-25T04:16:48.516Z ERROR codelldb::debug_session] Received invalid thread id in stack trace request. [2021-11-25T04:16:48.516Z ERROR codelldb::debug_session] Internal debugger error: Invalid thread id. [2021-11-25T04:16:48.517Z DEBUG codelldb::dap_codec] <-- {"type":"response","request_seq":11,"success":false,"command":"","message":"Internal debugger error: Invalid thread id.","show_user":true}
Beta Was this translation helpful? Give feedback.
All reactions