How do I run a command after launching the debugger in the C/C++ extension for Visual Studio Code? -


i have embedded c project run on arm cortex m4 on custom board or devkit, using gcc on mac. i've been using visual studio code ide embedded c work bit , looking use debugger in control gdb.

there 3 processes need run when debugging:

  1. gdb server
  2. gdb client
  3. a segger rtt executable, knows in target memory logging , displays on terminal.

i have launch.json file setup can handle #1 , #2 ok, still need set #3.

{     "version": "0.2.0",     "configurations": [         {             "name": "gdb launch",             "type": "cppdbg",             "request": "launch",             "program": "${workspaceroot}/app/pca10040/_build/app.out",             "logging": {                 "exceptions": true,                 "moduleload": true,                 "programoutput": true,                 "enginelogging": true,                 "trace": true,                 "traceresponse": true             },             "args": [],             "stopatentry": true,             "cwd": "${workspaceroot}/app/pca10040",             "environment": [],             "externalconsole": false,             "osx": {                 "mimode": "gdb",                 "debugserverpath": "/applications/segger/jlink/jlinkgdbserver",                 "debugserverargs": "-device nrf52832_xxaa -if swd -speed 4000",                 "serverstarted": "connected target",                 "midebuggerpath": "${env:home}/dev/gcc-arm-none-eabi-4_9-2015q3/bin/arm-none-eabi-gdb",                 "midebuggerserveraddress": "localhost:2331",                 "args": [                     "-x ${workspaceroot}/app/pca10040/_build/.gdbinit"                 ]             }         }     ] } 

the executable #3 has run after #2 running. takes no arguments. i'd output show in 1 of panes down bottom ("output" or "debug console", doesn't matter).

the docs (https://github.com/microsoft/vscode-cpptools/blob/master/launch.md) mention launchcompletecommand, that's not need - goes gdb.

i guess create task this, that's thing run manually after hit "debug" , want fast.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -