Open brownts opened 2 months ago
interesting with regards to #145 . I'll try it later this week to see how it goes
I am not against adding it but curious as what differentiates Native Debug
from gdb
, codelldb
, lldbdap
and cpptools
.
Please open an PR and see Contribute, as this is an significant change FSF copy assignment is needed.
native-debug
tells to have command-cwd, which intuitively and according to other adapters (like cpptools
) might be the directory where ":target" (binary being debugged?) resides, but IMO the adapter expects to have the target
in :cwd
, right?
then :cwd
cannot be the CWD
for application to debug.
also, can arguments passed to application be relative to :cwd
?
how to choose between lldb
and gdb
? cpptools
has :MIMode
for that for example.
native-debug
tells to have command-cwd, which intuitively and according to other adapters (likecpptools
) might be the directory where ":target" (binary being debugged?) resides, but IMO the adapter expects to have thetarget
in:cwd
, right?
In dape, command-cwd
is the CWD used for command
(i.e., the Debug Adapter executable -- in this case it's "node", as it's a typescript/javascript application). To specify CWD for the application, use :cwd
.
also, can arguments passed to application be relative to
:cwd
?
Yes. Note that :target
is used to specify the application.
how to choose between
lldb
andgdb
?cpptools
has:MIMode
for that for example.
Use :type
. Similarly to how the :MIMode
configuration was setup for cpptools, this will try to guess which debugger to use by searching your path. However, you can override that by specifying :type
yourself. That is also used to choose the correct native-debug javascript file to run (lldb.js or gdb.js), depending on the value of :type
.
@brownts how do you feel about opening up an pr with the addition of native-debug
?
@brownts how do you feel about opening up an pr with the addition of
native-debug
?
Hi @svaante, I don't have FSF paperwork in place, so I don't plan on submitting a PR, at least not anytime soon. If someone else wants to take that on, I'm fine with it. I'm also fine to just leave it in this issue, or even close the issue if you want.
The Native Debug adapter has been around for quite a while and is an alternative to the Micrsoft
cpptools
debug adapter, supporting both GDB and LLDB.The following are a set of installation instructions:
The following is a good start at the configuration entry: