Want to debug, but stuck on "No Configurations"

Hello. Please forgive me in advance if this has been asked; I've searched and couldn't find anything.

MacBook Pro M1 Max; macOS Monterey; Arduino IDE v2.0.0
Board: Blues Wireless Swan (stm32l4r5/stm32duino); ST-Link V3 Mini

To set the baseline, I loaded a sketch that's known-good on 1.8. Uploaded sketch via upload method STM32CubeProgrammer (SWD) and it works fine. This was how in my mind I validated, as a baseline, that stlink connectivity is working.

Went to Debug tab on the left, which I've never used before and I am psyched about. Dropdown says "No Configuration". Selected Add Configuration.. and it prompted for programmer type. Selected "{} Cortex Debug: ST-LINK", which brought me to launch.json, and it added this configuration:

    {
      "cwd": "${workspaceRoot}",
      "executable": "./bin/executable.elf",
      "name": "Debug Microcontroller",
      "request": "launch",
      "type": "cortex-debug",
      "servertype": "stlink"
    }

Made the assumption that ./bin/executable.elf isn't really the name, so I went fishing, found the executable, and changed it so now my entire launch.json looks like:

{
  "version": "0.2.0",
  "configurations": [    
    {
      "cwd": "${workspaceRoot}",
      "executable": "/var/folders/r_/1d0b7lbj7vz9qnd_by4fxsxw0000gn/T/arduino-sketch-675F50680F8108B5CFD0E046ED4A0A8F/notepower.ino.elf",
      "name": "Debug Microcontroller",
      "request": "launch",
      "type": "cortex-debug",
      "servertype": "stlink"
    }
  ]
}

(This seems awkward, though. Is there some var such as "executable":"${launchTargetPath}" that i'm supposed to be using?)

In any case, I did a File Save, and validated that this launch.json was saved to a .theia folder inside my sketch.

Unfortunately, this configuration didn't get added to the Add Configuration menu, which remains blank.

  • Tried pressing green triangle; that just wants to add another configuration.
  • Tried restarting IDE; nothing appeared in the menu.

Itching to try debugging! Suggestions?

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.