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.
