Example 5: Using the west debugserver server

nRF Connect for VS Code

tags
nRF Connect for VS Code

The following example shows a configuration that lets you launch a debug session by west debugserver.

This allows to run any debug server and attach a debug session to it. For example, the west debugserver can be launched. The example assumes that the debugserver runs on 127.0.0.1:2331.

launch.json with the nrf-connect debug type, with west debugserver - using gdbServer.args as a string
{
    "configurations": [
        {
            "type": "nrf-connect",
            "request": "attach",
            "name": "Launch hello_world",
            "config": "${workspaceFolder}/build/hello_world",
            "gdbServer": {
                "address": "127.0.0.1:2331",
                "path": "west",
                "args": "debugserver --build-dir ${activeConfig}"
            }
        }
    ]
}