cdt-gdb-vscode icon indicating copy to clipboard operation
cdt-gdb-vscode copied to clipboard

The remote debugging connection cannot be disconnected normally

Open dingzhou-beck opened this issue 5 months ago • 1 comments

ENV

host:

os:  windows10

gdb: 10.2

cdt-gdb-vscode: v2.0.5

target:

arch: arm32

gdbserver: 7.6

I am currently using cdt-gdb-vscode for remote debugging in VS Code. Here is my configuration file:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "arm32_debug",
            "type": "gdbtarget",
            "request": "launch",
            "gdbNonStop": true,
            "gdb": "d:\\debugger_gdb\\aarch64-linux-gnu-gdb.exe",
            "program": "${workspaceFolder}\\build\\app.elf",
            "logFile": "${workspaceFolder}\\.vscode\\debug.log",
            "verbose": true,
            "cwd": "${workspaceFolder}",
            "target": {
                "type": "remote",
                "host": "10.0.2.20",
                "port": "64025",
                "serverParameters": []
            }
        }
    ]
}

Problem

1.The program executed normally and completed, but an error message appeared: You can't do that when your target is 'exec'; however, gdbserver exited normally.

Image

  1. When the debugging session is started and stops at a certain breakpoint, if 'stop' is directly used, the remote gdbserver does not terminate.

logs:

gdbserver stoppedTo client: {"seq":0,"type":"response","request_seq":12,"command":"disconnect","success":true}

This seems to merely disconnect the connection, but it does not terminate the remote gdbserver process.

It is worth noting that I also used cpp-dbg in VSCode to remotely debug with the same environment and program, and it worked well. Moreover, when executing "stop", it first sends a "kill" command to gdbserver and then exits gdb. Is this a difference in the debugging adapter?

Do you know if there are any other restrictions? Or is there a problem with my debugging configuration? Thank you for your correction.

dingzhou-beck avatar Jul 01 '25 14:07 dingzhou-beck