On the target machine:
JLinkGDBServer -Port 5555 -device NRF52 -if SWD
In VSCode locally, add the following config block in launch.json
:
{
"name": "Remote Debug",
"cwd": "${workspaceRoot}",
"executable": "build/src/myapp",
"gdbTarget": "192.168.22.6:5555",
"request": "launch",
"type": "cortex-debug",
"servertype": "external",
"device": "nrf52",
"interface": "swd",
"armToolchainPath": "/usr/local/arm/bin"
}
servertype "external", and gdbTarget are the keys to get it working