Skip to main content
Associate II
Jul 29, 2026 1:30 AM UTC
Solved

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

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.

vincent_grenetBest answer
ST Employee
Jul 29, 2026 8:19 AM UTC

​@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.

6 replies

vincent_grenetBest answer
ST Employee
Jul 29, 2026 8:19 AM UTC

​@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
Aug 5, 2026 4:54 AM UTC

OK. I'm really looking forward to this.

Cartu38 OpenDev
Graduate II
Jul 30, 2026 6:32 AM UTC

​@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
Aug 5, 2026 4:52 AM UTC

谢谢。我回去看看。

Associate
Jul 30, 2026 5:56 PM UTC

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
Aug 5, 2026 5:00 AM UTC

Thank you very much. This looks very interesting.