Open ldarshan1991 opened 3 years ago
@WardenGnaw I repro the bug consistently. The 1st time both apps debug. The 2nd time, one of them fails with
1: (130) LaunchOptions{"name":"gcc.exe - Build and debug active ... 1: (233) Wait for connection completion.
1: (20285) Send Event AD7MessageEvent
Can you share the engineLogs?
This can be done by adding
logging": { "engineLogging": true, "trace": true, "traceResponse": true }
in your launch.json
@WardenGnaw I did the repro with those log settings and provided the logs at https://github.com/microsoft/vscode-cpptools/issues/6431#issuecomment-723236379 . Did you need more info/logs? The logs I provided are when the failure occurs.
That is not the full log since the following is not a valid launch configuration.
(130) LaunchOptions{"name":"gcc.exe - Build and debug active ...
Ah, okay. Also, I was using trace instead of traceResponse.
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (148) LaunchOptions{\"name\":\"App2\",\"type\":\"cppdbg\",\"request\":\"launch\",\"program\":\"c:\\\test2.exe\",\"args\":[],\"stopAtEntry\":false,\"cwd\":\"C:\\",\"environment\":[],\"externalConsole\":false,\"MIMode\":\"gdb\",\"miDebuggerPath\":\"C:\\Program Files\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin\\gdb.exe\",\"setupCommands\":[{\"description\":\"Enable pretty-printing for gdb\",\"text\":\"-enable-pretty-printing\",\"ignoreFailures\":true}],\"logging\":{\"engineLogging\":true,\"traceResponse\":true},\"preLaunchTask\":\"App2\",\"configurationTarget\":5,\"sessionId\":\"48e59fb3-aff0-4ce6-95ca-b409417733f6\"}\r\n"},"seq":2} 1: (148) LaunchOptions{"name":"App2","type":"cppdbg","request":"launch","program":"c:\test2.exe","args":[],"stopAtEntry":false,"cwd":"C:\","environment":[],"externalConsole":false,"MIMode":"gdb","miDebuggerPath":"C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\gdb.exe","setupCommands":[{"description":"Enable pretty-printing for gdb","text":"-enable-pretty-printing","ignoreFailures":true}],"logging":{"engineLogging":true,"traceResponse":true},"preLaunchTask":"App2","configurationTarget":5,"sessionId":"48e59fb3-aff0-4ce6-95ca-b409417733f6"} --> C (runInTerminal-4): {"type":"request","command":"runInTerminal","arguments":{"kind":"integrated","title":"cppdbg: test2.exe","cwd":"","args":["c:\.vscode-insiders\extensions\ms-vscode.cpptools-1.1.0\debugAdapters\bin\WindowsDebugLauncher.exe","--stdin=Microsoft-MIEngine-In-m4fk4vsf.ay4","--stdout=Microsoft-MIEngine-Out-ek15kyzf.0i3","--stderr=Microsoft-MIEngine-Error-nspv5ulq.zgh","--pid=Microsoft-MIEngine-Pid-sz5ndtre.oxe","--dbgExe=C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\gdb.exe","--interpreter=mi"],"env":{}},"seq":4} --> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (268) Wait for connection completion.\r\n"},"seq":6} 1: (268) Wait for connection completion. --> E (output): {"type":"event","event":"output","body":{"category":"stderr","output":"\r\n\r\n"},"seq":8}
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (20295) Send Event AD7MessageEvent\r\n"},"seq":10} 1: (20295) Send Event AD7MessageEvent --> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/MIEngine/DebuggerAborted","data":{"VS.Diagnostics.Debugger.MIEngine.DebuggerName":"GDB","VS.Diagnostics.Debugger.MIEngine.LastSentCommandName":""}},"seq":12} --> E (output): {"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/Launch","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"16.5.11030.1","VS.Diagnostics.Debugger.HostVersion":"16.5.11030.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.Launch.ErrorCode":1005,"VS.Diagnostics.Debugger.Launch.IsError":true}},"seq":14} --> R (launch-2): {"type":"response","request_seq":2,"success":false,"command":"launch","message":"Unable to start debugging. Unable to establish a connection to GDB. Debug output may contain more information.","body":{"error":{"id":1005,"format":"Unable to start debugging. Unable to establish a connection to GDB. Debug output may contain more information."}},"seq":16}
Also, the bug doesn't repro with cppvsdbg only cppdbg.
@WardenGnaw Have you got the necessary logs from @sean-mcmanus or do you want me to collect?
I think the logs should be sufficient (I haven't heard otherwise). Andrew might be busy.
okay
Type: Debugger
Describe the bug
To Reproduce Please include a code sample and
launch.json
configuration. Steps to reproduce the behavior:{ "launch": { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "App1", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/path/to/the/executable/x86_64bi_linux-abc", "args": [ "102" ], "presentation": { "hidden": false, "group": "NonGDB", "order": 1 }, "stopAtEntry": false, "cwd": "/another/path/where/necessary/data/file/is/present", "environment": [], "externalConsole": false, "MIMode": "gdb", "miDebuggerPath": "/path/to/gdb-8.1.2", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] }, { "name": "App2", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/path/to/the/executable/x86_64bi_linux-abc", "args": [ "102" ], "presentation": { "hidden": false, "group": "NonGDB", "order": 1 }, "stopAtEntry": false, "cwd": "/another/path/where/necessary/data/file/is/present", "environment": [], "externalConsole": false, "MIMode": "gdb", "miDebuggerPath": "/path/to/gdb-8.1.2", "setupCommands": [ { "description": "Enable pretty-printing for gdb", "text": "-enable-pretty-printing", "ignoreFailures": true } ] } ], "compounds": [ { "name": "App1/App1", "configurations": ["App1", "App1"] } ] }