Unable to start debugging. Unexpected GDB output from command "-target-select remote 10.102.88.203:1223". Remote communication error. Target disconnected.: Connection reset by peer.
HerrCraziDev opened this issue · comments
Environment
- OS and version: Windows 11
- VS Code: 1.88.1
- C/C++ extension: 1.19.9
- OS and version of remote machine (if applicable): Linux (yocto) kernel 5.15.71
- GDB / LLDB version: gdbserver 11.2
Bug Summary and Steps to Reproduce
Bug Summary:
When remotely debugging, vscode is unable to restart gdbserver
when clicking the "restart" icon on the debug menu.
The remote gdbserver
exits and is never relaunched. It must be relaunched manually over SSH to re-initate a debugging session.
This extension should restart gdbserver
on the remote.
Steps to reproduce:
- Start
gdbserver
on the remotegdbserver :<port> <path/to/bin>
- Connect to
gdbserver
from vscode - Debug
- Click the "Restart" button in the debugger menu
gdbserver
exits on the remote and vscode displays the attached error.
Unable to start debugging. Unexpected GDB output from command "-target-select remote <ip>:<port>". Remote communication error. Target disconnected.: Connection reset by peer.
Debugger Configurations
{
"version": "0.2.0",
"configurations": [
{
"name": "PM Debug",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/bld/<bin>",
"miDebuggerServerAddress": "${env:RBIP}:1223",
"args": [],
"stopAtEntry": false,
"cwd": "/opt",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"miDebuggerPath": "${env:SDK_PATH}/sysroots/x86_64-deysdk-linux/usr/bin/aarch64-dey-linux/aarch64-dey-linux-gdb",
"setupCommands": [
{ "text": "set sysroot ${env:SDK_PATH}/sysroots/cortexa53-crypto-dey-linux/", "description": "set sysroot", "ignoreFailures": false },
{ "text": "handle SIG34 nostop noprint pass noignore", "description": "disable SIG34 handling", "ignoreFailures": false }
],
"additionalSOLibSearchPath": "${workspaceRoot}/bld/<bin>.so",
}
]
}
Debugger Logs
Kill the program being debugged? (y or n) [answered Y; input not from terminal]
[Inferior 1 (process 22216) killed]
The program '/home/<user>/<workdir>/bld/<bin>' has exited with code 0 (0x00000000).
Other Extensions
No response
Additional Information
No response
Any news on this ?
Did you try that bindto thing. Maybe it works for you. Specify hostname or IPv4 address on which to listen for incoming TCP/IP connections. By default, OpenOCD will listen on the loopback interface only. If your network environment is safe, bindto 0.0.0.0 can be used to cover all available interfaces. Simply add it to your config file and let me know if it works.
@HerrCraziDev I don't have any update on this issue.