Example 3: Remote debugging enabled

nRF Connect for VS Code

tags
nRF Connect for VS Code

The following example shows a configuration that lets you set up a debug session against a remote GDB server. The server is already running on the IP address 10.0.0.84, port 2331, using the gdbServer.address and gdbServer.path configuration fields. The flash field is not present as it cannot be used with the attach request.

launch.json with the nrf-connect debug type, with the remote debugging enabled
{
    "configurations": [
        {
            "name": "Launch hello_world",
            "type": "nrf-connect",
            "request": "attach",
            "config": "${workspaceFolder}/build/hello_world",
            "gdbServer": {
                "address": "10.0.0.84:2331",
                "path": null
            }
        }
    ]
}