Theia: Support debugging with GDB

Created on 5 Sep 2018  路  10Comments  路  Source: eclipse-theia/theia

It would be nice to be able to debug C/C++ projects using GDB. This issue can track possible approaches to achieving this.

cpp debug

Most helpful comment

Our use case is only targeting CMSIS-DAP compliant embedded devices being debugged via our pyOCD tool. The gdbserver it exposes is used by code-debug already.
So we aren't connecting to c++ processes running on the machine.

Code-debug drives gdb client using MI commands, so it should be relatively easy to spin up a different gdbserver and point it at that instead.

All 10 comments

@jonahgraham FYI.

@jonahgraham FYI the Theia debug extension code you started-from had a little bug, about its stated license in package.json, that should probably be fixed on your side as well: https://github.com/theia-ide/theia/pull/2787

@jonahgraham We have that cortex DAP working with Theia for mbed debugging already, perhaps we should collude? :)

We would like to be part of the collusion too :)

@marechal-p is playing with code-debug ATM.

@thegecko from what I was gathering on this ARM Cortex Debug Access Port it seemed to be a technology to debug some peripheral's processors. Is your Debug Adapter for it able to debug about any native (C/C++ built) application on standard desktop computers (say on Ubuntu)?

Trying to understand precisely what you did and what it enables us to do :)

Our use case is only targeting CMSIS-DAP compliant embedded devices being debugged via our pyOCD tool. The gdbserver it exposes is used by code-debug already.
So we aren't connecting to c++ processes running on the machine.

Code-debug drives gdb client using MI commands, so it should be relatively easy to spin up a different gdbserver and point it at that instead.

For reference, I've created a PR for the cortex debugger:

https://github.com/theia-ide/theia/pull/3000

Closing the issue as there is now support for debugging using gdb both through the VS Code extensions as well as the extension @theia/cpp-debug. :tada:

Was this page helpful?
0 / 5 - 0 ratings