Skip to main content
Associate
July 23, 2026
Question

How to use liveWatch when debugging with Jlink in STM32CubeIDE for Visual Studio Code

  • July 23, 2026
  • 1 reply
  • 11 views
        {
"type": "jlinkgdbtarget",
"request": "launch",
"name": "STM32Cube: Launch JLink 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}"
}
],
"liveWatch": {
"enabled": true,
"samplesPerSecond": "4"
}
},

Under this configuration, the prompt indicates that the attribute "liveWatch" is not allowed.

1 reply

GGB1Author
Associate
July 23, 2026

This is the analysis conducted by GPT.

STM32CubeIDE for Visual Studio Code 3.10.0

JLinkDebugTargetAdapter correctly creates the Live Watch client.

However, the Live Watch client immediately issues

-var-create

while the target is running.

SEGGER J-Link GDB Server returns

Cannot execute this command while the target is running.

Use the "interrupt" command to stop the target and then try again.

Therefore all Live Watch variables remain

Not Available.

This works with ST-Link GDB Server because it apparently accepts -var-create while the target is running.

It seems the J-Link adapter should either

1. interrupt the target before issuing -var-create

or

2. create all variable objects before continuing execution.