I have similar (or same) situation with exception that it all worked with C/C++ Extension Version v1.0.1 and stop working in v1.1.0-insiders3.
With launch.json below, this is (valid) behavior that I observe with v1.0.1 (in windows):
- jlinkgdbserverstart.bat is executed (
debugServerPath) and I can see jlink server instance running in windows
- arm-none-eabi-gdb.exe (miDebuggerPath) attach (connect) to jlink debug server
- setupCommands are sent to target device
- debug working in vscode
- gdb link with jlink server is disconnected on debug stop
With v1.1.0-insiders3:
- jlinkgdbserverstart.bat is not executed (
debugServerPath)
If I add "miDebuggerServerAddress": "localhost:2331" then debugServerPath is executed but then miDebuggerPath is not used.
It seams like behavior change is introduced in MIEngine with microsoft/MIEngine#1056 (It's just a guess based on not to deep digging).
{
"version": "0.2.0",
"configurations": [
{
"name": "[MCU/GDB] Debug/JLink",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceRoot}/build/${workspaceFolderBasename}.elf",
"windows": {
"miDebuggerPath": "C://toolchain//gnu//arm-none-eabi-gdb.exe",
"debugServerPath": "${workspaceRoot}/jlinkgdbserverstart.bat",
"externalConsole": true
},
"linux": {
"miDebuggerPath": "/usr/local/gcc-arm-none-eabi/bin/arm-none-eabi-gdb",
"debugServerPath": "${workspaceRoot}/jlinkgdbserverstart.sh",
"externalConsole": false
},
"stopAtEntry": true,
"cwd": "${workspaceRoot}",
"environment": [],
"MIMode": "gdb",
"miDebuggerArgs": "--cd=${workspaceRoot}",
"setupCommands": [
... my specific gdb commands to load firmware to arm target etc...
],
"preLaunchTask": "[Misc][Debug] Create JLink GDB server script"
}
]
}
jlinkgdbserverstart.bat -> this is generated with preLaunchTask [Misc][Debug] Create JLink GDB server script. Example of content is:
JLinkGDBServerCL -singlerun -select USB=440150122 -device EFM32GG380F512 -endian little -if SWD -speed 4000 -i
Originally from Luka234
I have similar (or same) situation with exception that it all worked with C/C++ Extension Version v1.0.1 and stop working in v1.1.0-insiders3.
With
launch.jsonbelow, this is (valid) behavior that I observe with v1.0.1 (in windows):debugServerPath) and I can see jlink server instance running in windowsWith v1.1.0-insiders3:
debugServerPath)If I add
"miDebuggerServerAddress": "localhost:2331"thendebugServerPathis executed but thenmiDebuggerPathis not used.It seams like behavior change is introduced in MIEngine with microsoft/MIEngine#1056 (It's just a guess based on not to deep digging).
jlinkgdbserverstart.bat -> this is generated with preLaunchTask [Misc][Debug] Create JLink GDB server script. Example of content is:
JLinkGDBServerCL -singlerun -select USB=440150122 -device EFM32GG380F512 -endian little -if SWD -speed 4000 -iOriginally from Luka234