Example 1: Using the nrf-connect debug type

nRF Connect for VS Code

tags
nRF Connect for VS Code

The following example shows a launch.json file using the nrf-connect debug type.

Note

Using the nrf-connect debug type is required to use the extension debugger. This debug type is used to associate the debug configuration with the extension.

launch.json with the nrf-connect debug type
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "nrf-connect",
            "request": "launch",
            "name": "Launch active build configuration",
            "config": "${activeConfig}",
            "runToEntryPoint": "main",
            "preLaunchTask": "nRF Connect: Build active configuration"
        },
        {
            "name": "Launch build_nrf52840dk_nrf52840",
            "type": "nrf-connect",
            "request": "launch",
            "config": "c:\\Users\\joe\\workspace\\apps\\hello_world\\build_nrf52840",
            "runToEntryPoint": "main"
        }
    ]
}