code-debug icon indicating copy to clipboard operation
code-debug copied to clipboard

Automatically run debug server

Open 7adidoo opened this issue 7 years ago • 1 comments

I am searching for a solution to run a gdb server before running the debugger itself.

I am debugging an ARM target with arm gcc gdb and openocd. launch.json: "version": "0.2.0", "configurations": [ { "type": "gdb", "request": "launch", "name": "debug", "cwd": "${workspaceRoot}", "target": "./build/${workspaceRootFolderName}.elf", "gdbpath" : "C:/ARMToolchain/gcc-7-2017-q4-major/bin/arm-none-eabi-gdb.exe", "autorun": [ "target remote localhost:3333", "monitor reset halt", "load ./build/${workspaceRootFolderName}.elf", "monitor reset halt" ] } ]

I have to run "c:\aaa\openocd.exe -f conf.cfg" on a console before starting the debugging. Is it possible to automate this ?

7adidoo avatar Mar 24 '18 19:03 7adidoo

The Cortex-Debug does this: https://marketplace.visualstudio.com/items?itemName=marus25.cortex-debug

Otherwise you could create a VSCode task to run the GDB server prior to the debugger? VSCode tasks can be added by using the "preLaunchTask" command.

higaski avatar Sep 26 '18 18:09 higaski