GDB - unable to debug on Windows 10 after version update to 0.20.1

Đang mở
#2,767 16 bình luận 2 reaction 1 người được giao Xem trên GitHub

@pieandcakes đang làm issue này rồi.

Từ ngày 5/11/2018.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug debugger embedded

Type: Debugger
Input information below

Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.

Describe the bug

  • OS and Version: Windows 10
  • VS Code Version: 1.28.2
  • C/C++ Extension Version: 0.20.1
  • Other extensions you installed (and if the issue persists after disabling them): Python (Microsoft) 2018.9.2

Debugging an embedded device using VSCode with GDB over openOCD. Debugging environment/process was stable/functional prior to recent update cpptools extension update. Now getting following error message after launch.json has run to near completion:

"Unable to start debugging. Unable to establish a connection to GDB. Debug output may contain more information"

I can launch both GDB and openOCD from command prompt/terminal so pretty sure they are both configured properly.

Additional context
If applicable, please include logging by adding "logging": { "engineLogging": true, "trace": true, "traceResponse": true } in your launch.json

{
    // 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": "C++ Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceRoot}/BUILD/MTS_MDOT_F411RE/GCC_ARM-DEBUG/${workspaceRootFolderName}.elf",
            "args": [],
            "stopAtEntry": true,
            "cwd": "${workspaceRoot}",
            "environment": [],
            "launchCompleteCommand": "exec-continue",
            "externalConsole": false,
            "debugServerArgs": "-f C:/OpenOCD/openocd-0.10.0/scripts/board/st_nucleo_f4.cfg -f C:/OpenOCD/openocd-0.10.0/scripts/interface/stlink-v2-1.cfg -c init -c \"reset init\"",
            "serverLaunchTimeout": 20000,
            "filterStderr": true,
            "filterStdout": false,
            "serverStarted": "target halted due to debug-request, current mode: Thread",
            "preLaunchTask": "mbed",
            "setupCommands": [
                { "text": "-target-select remote localhost:3333", "description": "connect to target", "ignoreFailures": false },
                { "text": "-file-exec-and-symbols ${workspaceRoot}/BUILD/MTS_MDOT_F411RE/GCC_ARM-DEBUG/${workspaceRootFolderName}.elf", "description": "load file", "ignoreFailures": false},
                { "text": "-interpreter-exec console \"monitor endian little\"", "ignoreFailures": false },
                { "text": "-interpreter-exec console \"monitor reset\"", "ignoreFailures": false },
                { "text": "-interpreter-exec console \"monitor halt\"", "ignoreFailures": false },
                { "text": "-interpreter-exec console \"monitor arm semihosting enable\"", "ignoreFailures": false },
                { "text": "-target-download", "description": "flash target", "ignoreFailures": false }
            ],
            "logging": {
                "moduleLoad": true,
                "trace": true,
                "engineLogging": true,
                "programOutput": true,
                "exceptions": true,
                "traceResponse": true
            },
            "windows": {
                "preLaunchTask": "mbed",
                "MIMode": "gdb",
                "MIDebuggerPath": "C:\\Program Files (x86)\\GNU Tools ARM Embedded\\6 2017-q2-update\\bin\\arm-none-eabi-gdb.exe",
                "debugServerPath": "C:\\openOCD\\openocd-0.10.0\\bin\\openocd.exe",
                "setupCommands": [
                    { "text": "-environment-cd ${workspaceRoot}\\BUILD\\MTS_MDOT_F411RE\\GCC_ARM-DEBUG\\" },
                    { "text": "-target-select remote localhost:3333", "description": "connect to target", "ignoreFailures": false },
                    { "text": "-file-exec-and-symbols ${workspaceRootFolderName}.elf", "description": "load file", "ignoreFailures": false},
                    { "text": "-interpreter-exec console \"monitor endian little\"", "ignoreFailures": false },
                    { "text": "-interpreter-exec console \"monitor reset\"", "ignoreFailures": false },
                    { "text": "-interpreter-exec console \"monitor halt\"", "ignoreFailures": false },
                    { "text": "-interpreter-exec console \"monitor arm semihosting enable\"", "ignoreFailures": false },
                    { "text": "-target-download", "description": "flash target", "ignoreFailures": false }
                ]
            }
        }
    ]
}

Debug Console output:

--> E (output): {"event":"output","body":{"category":"console","output":"1: (378) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'\r\n"},"seq":2,"type":"event"}

1: (378) LaunchOptions<LocalLaunchOptions xmlns='http://schemas.microsoft.com/vstudio/MDDDebuggerOptions/2014'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (403) LaunchOptions ExePath='Z:\VoBoNode_Demo\BUILD\MTS_MDOT_F411RE\GCC_ARM-DEBUG\VoBoNode_Demo.elf'\r\n"},"seq":4,"type":"event"}

1: (403) LaunchOptions ExePath='Z:\VoBoNode_Demo\BUILD\MTS_MDOT_F411RE\GCC_ARM-DEBUG\VoBoNode_Demo.elf'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (404) LaunchOptions WorkingDirectory='Z:\VoBoNode_Demo'\r\n"},"seq":6,"type":"event"}

1: (404) LaunchOptions WorkingDirectory='Z:\VoBoNode_Demo'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (405) LaunchOptions ExeArguments='2>CON 1>CON <CON'\r\n"},"seq":8,"type":"event"}

1: (405) LaunchOptions ExeArguments='2>CON 1>CON <CON'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (406) LaunchOptions MIMode='gdb'\r\n"},"seq":10,"type":"event"}

1: (406) LaunchOptions MIMode='gdb'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (406) LaunchOptions MIDebuggerPath='C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-gdb.exe'\r\n"},"seq":12,"type":"event"}

1: (406) LaunchOptions MIDebuggerPath='C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-gdb.exe'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (407) LaunchOptions WaitDynamicLibLoad='false'\r\n"},"seq":14,"type":"event"}

1: (407) LaunchOptions WaitDynamicLibLoad='false'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (408) LaunchOptions DebugServer='C:\openOCD\openocd-0.10.0\bin\openocd.exe'\r\n"},"seq":16,"type":"event"}

1: (408) LaunchOptions DebugServer='C:\openOCD\openocd-0.10.0\bin\openocd.exe'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (408) LaunchOptions DebugServerArgs='-f C:/OpenOCD/openocd-0.10.0/scripts/board/st_nucleo_f4.cfg -f C:/OpenOCD/openocd-0.10.0/scripts/interface/stlink-v2-1.cfg -c init -c "reset init"'\r\n"},"seq":18,"type":"event"}

1: (408) LaunchOptions DebugServerArgs='-f C:/OpenOCD/openocd-0.10.0/scripts/board/st_nucleo_f4.cfg -f C:/OpenOCD/openocd-0.10.0/scripts/interface/stlink-v2-1.cfg -c init -c "reset init"'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (409) LaunchOptions ServerStarted='target halted due to debug-request, current mode: Thread'\r\n"},"seq":20,"type":"event"}

1: (409) LaunchOptions ServerStarted='target halted due to debug-request, current mode: Thread'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (410) LaunchOptions FilterStderr='true'\r\n"},"seq":22,"type":"event"}

1: (410) LaunchOptions FilterStderr='true'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (411) LaunchOptions ServerLaunchTimeout='20000'\r\n"},"seq":24,"type":"event"}

1: (411) LaunchOptions ServerLaunchTimeout='20000'

--> E (output): {"event":"output","body":{"category":"console","output":"1: (412) LaunchOptions>\r\n"},"seq":26,"type":"event"}

1: (412) LaunchOptions>

--> E (output): {"event":"output","body":{"category":"console","output":"1: (412) LaunchOptions \r\n"},"seq":28,"type":"event"}

1: (412) LaunchOptions

--> E (output): {"event":"output","body":{"category":"console","output":"1: (413) LaunchOptions -environment-cd Z:\VoBoNode_Demo\BUILD\MTS_MDOT_F411RE\GCC_ARM-DEBUG\\r\n"},"seq":30,"type":"event"}

1: (413) LaunchOptions -environment-cd Z:\VoBoNode_Demo\BUILD\MTS_MDOT_F411RE\GCC_ARM-DEBUG</Command>

--> E (output): {"event":"output","body":{"category":"console","output":"1: (414) LaunchOptions -target-select remote localhost:3333\r\n"},"seq":32,"type":"event"}

1: (414) LaunchOptions -target-select remote localhost:3333

--> E (output): {"event":"output","body":{"category":"console","output":"1: (415) LaunchOptions -file-exec-and-symbols VoBoNode_Demo.elf\r\n"},"seq":34,"type":"event"}

1: (415) LaunchOptions -file-exec-and-symbols VoBoNode_Demo.elf

--> E (output): {"event":"output","body":{"category":"console","output":"1: (415) LaunchOptions -interpreter-exec console "monitor endian little"\r\n"},"seq":36,"type":"event"}

1: (415) LaunchOptions -interpreter-exec console "monitor endian little"

--> E (output): {"event":"output","body":{"category":"console","output":"1: (416) LaunchOptions -interpreter-exec console "monitor reset"\r\n"},"seq":38,"type":"event"}

1: (416) LaunchOptions -interpreter-exec console "monitor reset"

--> E (output): {"event":"output","body":{"category":"console","output":"1: (417) LaunchOptions -interpreter-exec console "monitor halt"\r\n"},"seq":40,"type":"event"}

1: (417) LaunchOptions -interpreter-exec console "monitor halt"

--> E (output): {"event":"output","body":{"category":"console","output":"1: (418) LaunchOptions -interpreter-exec console "monitor arm semihosting enable"\r\n"},"seq":42,"type":"event"}

1: (418) LaunchOptions -interpreter-exec console "monitor arm semihosting enable"

--> E (output): {"event":"output","body":{"category":"console","output":"1: (418) LaunchOptions -target-download\r\n"},"seq":44,"type":"event"}

1: (418) LaunchOptions -target-download

--> E (output): {"event":"output","body":{"category":"console","output":"1: (419) LaunchOptions \r\n"},"seq":46,"type":"event"}

1: (419) LaunchOptions

--> E (output): {"event":"output","body":{"category":"console","output":"1: (420) LaunchOptions exec-continue\r\n"},"seq":48,"type":"event"}

1: (420) LaunchOptions exec-continue

--> E (output): {"event":"output","body":{"category":"console","output":"1: (421) LaunchOptions\r\n"},"seq":50,"type":"event"}

1: (421) LaunchOptions

--> E (output): {"event":"output","body":{"category":"console","output":"1: (626) Starting: "C:\openOCD\openocd-0.10.0\bin\openocd.exe" -f C:/OpenOCD/openocd-0.10.0/scripts/board/st_nucleo_f4.cfg -f C:/OpenOCD/openocd-0.10.0/scripts/interface/stlink-v2-1.cfg -c init -c "reset init"\r\n"},"seq":52,"type":"event"}

1: (626) Starting: "C:\openOCD\openocd-0.10.0\bin\openocd.exe" -f C:/OpenOCD/openocd-0.10.0/scripts/board/st_nucleo_f4.cfg -f C:/OpenOCD/openocd-0.10.0/scripts/interface/stlink-v2-1.cfg -c init -c "reset init"

--> C (runInTerminal-54): {"command":"runInTerminal","arguments":{"kind":"integrated","title":"cppdbg: VoBoNode_Demo.elf","cwd":"","args":["c:\Users\jgree\.vscode\extensions\ms-vscode.cpptools-0.20.1\debugAdapters\bin\WindowsDebugLauncher.exe","--stdin=Microsoft-MIEngine-In-aibwdev5.3q5","--stdout=Microsoft-MIEngine-Out-bgse5di4.swp","--stderr=Microsoft-MIEngine-Error-ux1hs1x1.4pt","--pid=Microsoft-MIEngine-Pid-3n40cnth.lit","--dbgExe=C:\Program Files (x86)\GNU Tools ARM Embedded\6 2017-q2-update\bin\arm-none-eabi-gdb.exe","--interpreter=mi"],"env":{}},"seq":54,"type":"request"}

--> E (output): {"event":"output","body":{"category":"console","output":"1: (1182) Wait for connection completion.\r\n"},"seq":56,"type":"event"}

1: (1182) Wait for connection completion.

--> E (output): {"event":"output","body":{"category":"stderr","output":"Starting: "C:\openOCD\openocd-0.10.0\bin\openocd.exe" -f C:/OpenOCD/openocd-0.10.0/scripts/board/st_nucleo_f4.cfg -f C:/OpenOCD/openocd-0.10.0/scripts/interface/stlink-v2-1.cfg -c init -c "reset init"\r\n\r\n"},"seq":58,"type":"event"}

Starting: "C:\openOCD\openocd-0.10.0\bin\openocd.exe" -f C:/OpenOCD/openocd-0.10.0/scripts/board/st_nucleo_f4.cfg -f C:/OpenOCD/openocd-0.10.0/scripts/interface/stlink-v2-1.cfg -c init -c "reset init"

--> E (output): {"event":"output","body":{"category":"console","output":"1: (6241) <-logout\r\n"},"seq":60,"type":"event"}

1: (6241) <-logout

--> E (output): {"event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/Launch","data":{"VS.Diagnostics.Debugger.ImplementationName":"Microsoft.MIDebugEngine","VS.Diagnostics.Debugger.EngineVersion":"14.0.51030.1","VS.Diagnostics.Debugger.HostVersion":"14.0.51030.1","VS.Diagnostics.Debugger.AdapterId":"cppdbg","VS.Diagnostics.Debugger.Launch.ErrorCode":1005,"VS.Diagnostics.Debugger.Launch.IsError":true}},"seq":62,"type":"event"}

--> R (launch-2): {"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":64,"type":"response"}

Ngôn ngữ chính
TypeScript
Star
6.2k
Fork
1.7k
Merge trung bình
14 giờ 46 phút
Pull request đã merge (30 ngày)
61

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/vscode-cpptools

Tất cả issue của microsoft/vscode-cpptools

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.