2025-11-27 1:32 AM
Hello,
With the latest release of the extension (3.6.4), the pre-release version (based on bundle manager) was moved to be the official release, thus making CLT obsolete.
My original launch file (based on CLT) does not work anymore, it included a Debug script, an Attach script, and a build+flash-only script.
To create a compatible launch file, I used the preset script - "STM32Cube: STM32 Launch ST-Link GDB Server" by using vscode's "create a launch.json file" option.
This does work for debugging, but creates a few issues-
a. Doe's not contain an "Attach" option - I could not find any help on the options for configuring the "stlinkgdbtarget" script type.
b. The "Memory Inspector" which is part of the extension pack, does not work anymore with the generated launch file. I get a "No debugger attached" while debugging.
c. The vscode reset debug button does not reset the core anymore - it re-flashes the device.
Can anyone help me create a launch file that will contain these features based on the new "stlinkgdbtarget" or some other script type?
It's pretty annoying that the pre-release was pushed to release, while it removes some useful features and also does not include a separate release for the "cube" CLI.
Solved! Go to Solution.
2025-12-01 6:06 AM
Hi Sharon,
Sorry I misunderstood.
What you provided, if I understand correctly, is to connect to a running gdb server that is currently connected to the device?
Exactly.
Your use case is the "hot attach".
Here the template for this mode:
{
"type": "stlinkgdbtarget",
"request": "launch",
"name": "STM32Cube: STM32 Launch ST-Link GDB Server",
"origin": "snippet",
"cwd": "${workspaceFolder}",
"serverReset": "None",
"imagesAndSymbols": [
{
"symbolFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}"
}
]
}
Note the specific value for:
KR,
Flo
2025-11-27 10:26 PM
@SharonVEC
About memory inspector takes care to rely on CDT one. Works for me.
If former (2.x.y) STM32Cube extension end user you may get x2 installed what maybe confusing. 3.6.x is pulling CDT one and I guess stuff is validated for usage of such.
2025-11-28 4:53 AM
Hi Sharon,
About the attach option:
You need to change the value of the "request" attribute to "attach".
By doing this, you will have access only to the attributes related to the attach option with autocompletion.
The restart button indeed stops the debug session and restarts it, so it reflashes the target.
However, in the next release, the reset button will be available.
Here the template of the debug configuration using attach mode:
{
"type": "stlinkgdbtarget",
"request": "attach",
"name": "STM32Cube: STM32 Launch ST-Link GDB Server",
"origin": "snippet",
"cwd": "${workspaceFolder}",
"preBuild": "${command:st-stm32-ide-debug-launch.build}",
"runEntry": "main",
"imagesAndSymbols": [
{
"imageFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}"
}
],
"serverHost": "localhost",
"serverPort": "61234"
}
Kind Regards,
Flo
2025-12-01 3:24 AM
Thank you for the responses
@Cartu38 OpenDev This indeed was my issue, and the CDT one works fine, thank you!
@Florent V Thanks, but I think the word "attach" was misused in my questions.
What I need is the ability to debug the device without re-downloading and resetting the device, more like "attaching" to the running code on the device.
What you provided, if I understand correctly, is to connect to a running gdb server that is currently connected to the device?
Thanks.
2025-12-01 6:06 AM
Hi Sharon,
Sorry I misunderstood.
What you provided, if I understand correctly, is to connect to a running gdb server that is currently connected to the device?
Exactly.
Your use case is the "hot attach".
Here the template for this mode:
{
"type": "stlinkgdbtarget",
"request": "launch",
"name": "STM32Cube: STM32 Launch ST-Link GDB Server",
"origin": "snippet",
"cwd": "${workspaceFolder}",
"serverReset": "None",
"imagesAndSymbols": [
{
"symbolFileName": "${command:st-stm32-ide-debug-launch.get-projects-binary-from-context1}"
}
]
}
Note the specific value for:
KR,
Flo
2025-12-05 4:33 AM
Hi Florent,
Do You have a time frame for the reset button?
Is there a possibility to have this now (separate lunch script?).
The possibility to do a reset without flashing would reduce the debug time considerably, specially on big projects with external Flash usage.
best regards
Martin
2025-12-05 7:57 AM
Hi Martin,
Per forum policy, I cannot disclose any specific dates.
However, I can confirm that the reset button feature is already part of our codebase and has been successfully validated. It is expected to be included in the next update.
Note that the serverReset attribute is only used to define the type of reset to apply when starting the debug session.
The possibility to do a reset without flashing would reduce the debug time considerably, specially on big projects with external Flash usage.
Yes, the reset button is designed for those use cases. It will be available during the debug session. Using the default value (depending on the adapter), there will be nothing to add in the debug configuration (launch script); however, it will always be possible to modify the default behavior of this reset via a quickReset attribute.
KR,
Flo