cortex-debug: VS Code with Dev-containers: gdb server launches and exits right away
I have been using the Cortex-Debug extenstion with the VS Code Remote Containers extension without any issues for a few months now - I have a launch.json file that has successfully let me debug my firmware. I am using a Nordic board with a JLink debugger.
Until version 1.4.4, I had no problems. However, I rebuilt my container today and the extension got updated to 1.6.0 and I noticed that I wasn’t able to debug anymore - the moment I tried to launch the debugger, the server would launch and exit right away:
Waiting for gdb server to start...[2022-08-24T19:48:22.801Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
[2022-08-24T19:48:22.901Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start...
I downgraded step by step and reached v1.5.1 where it started working again. I went to v1.5.2 and it stopped working. So there was something between those versions that changed that stopped things from working. It could be something as simple as a configuration problem but I went through the changelogs and couldn’t find anything that would help here. Here is my launch.json file section relating to this issue:
{
"name": "nRF52 App",
"cwd": "${workspaceRoot}",
"preLaunchTask": "make build debug",
"executable": "${workspaceRoot}/_pca10056/s140/armgcc/_build/nrf52840_xxaa.out",
"armToolchainPath": "/usr/local/gcc-arm-none-eabi-9-2019-q4-major/bin/",
"request": "launch",
"type": "cortex-debug",
"servertype": "jlink",
"device": "nrf52840_xxaa",
"serialNumber": "51021094",
"svdFile": "${workspaceRoot}/nordic-sdk-17.0.2/modules/nrfx/mdk/nrf52.svd",
"interface": "swd",
"runToEntryPoint": "main",
"rttConfig": {
"enabled": true,
"address": "auto",
"decoders": [
{
"label": "",
"port": 0,
"type": "console"
}
]
},
}
If there is any more info I can provide, I am happy to do so.
Thank you.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15
Btw, we use MS version numbering convention.
X.Y.Z. Where oddYnumbers are pre-releases and even ones are final releases. You can subscribe to pre-releases if you like. Regardless, unless you disable auto-updates, VSCode auto-updates all extensions when they are updated.I don’t like the versioning system but have no choice and the best way for us to share pre-releases.