new nRF Debug in VSCode does not seem to support attach?

I have the launch.json as shown below so that I can attach the debugger to a running image.  This works with Cortex Debug.  However, when using nRF Debug it does not seem to have any effect.  How is attach supported with the new  nRF Debug?
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: go.microsoft.com/.../
"version": "0.2.0",
"configurations": [

{
"type": "nrf-connect",
"request": "launch",
"name": "Launch active build configuration",
"config": "${activeConfig}",
"runToEntryPoint": "main"
},
{
"type": "nrf-connect",
"request": "attach",
"name": "Attach Vulcan Release",
"postAttachCommands": [
"symbol-file /Users/denis/sandbox/pison/vulcan-firmware/applications/vulcan/build/zephyr/zephyr.elf"
],
"showDevDebugOutput": true,
"config": ""
},
{
"name": "Launch build",
"type": "nrf-connect",
"request": "launch",
"config": "/Users/denis/sandbox/pison/vulcan-firmware/applications/vulcan/build",
"runToEntryPoint": "main"
}
]
}
  • Hi Denis,

    I tried to reproduce this by attaching to a basic Blinky sample, and I was never able to attach the debugger without triggering flashing (which I assume is what you experienced).

    It turns out that this was a bug in the VS Code Extension. It's now been fixed for the next version which is releasing soon. At that point, the only thing needed to attach with nRF Debug should be to change the requests in launch.json from "launch" to "attach".

    Until then, a workaround would be to disable the nrf-connect.debugging.flash setting.

    Hope this solves your issue!

    Best regards,

    Raoul Pathak

  • Hi again! Just wanted to let you know that the new version of the extension released today. Attach should now be working as normal.

    Best regards,

    Raoul

Related