The following example shows a launch.json file using the nrf-connect debug type, like in the previous example, but with the configuration that allows you to launch the debugger against a device that is already running. This is done by changing the value of the request configuration field to attach and removing the runToEntryPoint configuration field. By using this configuration, the debugger does not pause the target automatically.
launch.json with the nrf-connect debug type, with attaching to target enabled
{
"version": "0.2.0",
"configurations": [
{
"type": "nrf-connect",
"request": "attach",
"name": "Launch active build configuration",
"config": "${activeConfig}"
}
]
}