Skip to main content
Associate II
July 29, 2026
Solved

When using Jlink Debug in STM32CubeIDE for Visual Studio Code, liveWatch cannot be used

  • July 29, 2026
  • 6 replies
  • 113 views

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

        {
"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"
}
},

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.

Best answer by vincent_grenet

@GGB1 
Live Watch variables are not yet supported for Segger J-Link. This feature is part of the roadmap, but no release date is available at this time.

6 replies

vincent_grenetBest answer
ST Employee
July 29, 2026

@GGB1 
Live Watch variables are not yet supported for Segger J-Link. This feature is part of the roadmap, but no release date is available at this time.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
GGB1Author
Associate II
August 5, 2026

OK. I'm really looking forward to this.

Cartu38 OpenDev
Graduate II
July 30, 2026

@GGB1 

I’m not Segger JLink skilled at all so no accurate comment here.

If you are maybe so called generic debug launch template usage may help you see 

 

GGB1Author
Associate II
August 5, 2026

谢谢。我回去看看。

Associate
July 30, 2026

You can use the cortex-debug extension instead. Here's an example configuration:

{
"version": "0.2.0",
"configurations": [
{
"name": "Example",
"type": "cortex-debug",
"executable": "${command:cmake.launchTargetPath}",
"request": "launch",
"servertype": "jlink",
"device": "STM32H753ZI",
"interface": "swd",
"armToolchainPath": ".../arm-gnu-toolchain/15.3.1/bin",
"liveWatch": {
"enabled": true,
"samplesPerSecond": 20
},
},
]
}

Alternatively, you can refer to the J-Link documentation for a more detailed setup guide.

GGB1Author
Associate II
August 5, 2026

Thank you very much. This looks very interesting.