Commit graph

13 commits

Author SHA1 Message Date
Ben.Jackson
4424969028 Fix installation issues on windows - find npm.cmd 2020-09-18 20:59:21 +01:00
Ben Jackson
6a1c9a6b52 Enable embedded vim python debugging
This allows us to use vimspector to debug vimspector. The idea is that
in Vim you call 'py3 from vimspector.developer import SetUpDebugpy;
SetUpDebugpy()' and then just attach to localhost:5678 using the new
multi-session mode support. Oof.
2020-05-17 19:17:09 +01:00
Ben Jackson
68a45b5771 Fix workspace root when no vimspector conf - use dir of current file 2020-02-16 20:01:00 +00:00
Ben Jackson
673de95283 Updates for latest Python debug adapter
They moved the location of the main application.

But also:

- ignore multiple responses for the same request
- ignore protocol violations for variablesReference (assume 0)
- ignore protocol violations for missing 'name' (assume basename of
path)
2018-12-20 13:42:58 +00:00
Ben Jackson
08eed4ff15 Update the test/example config file with vars 2018-06-10 23:35:33 +01:00
Ben Jackson
65e2a50d28 Yet more hacking. This sort of makes it work for rust 2018-05-29 02:15:18 +01:00
Ben Jackson
20045b2941 Support the lldb debugger
The advantage of this one is that it has globals and statics in the
variables and runs directly in lldb. It can also show disassembly,
though we don't yet support that.

The disadvantage is that this is yet another plugin that plays fast and
loose with the protocol, so we have to add a bunch more gets.
2018-05-29 01:48:37 +01:00
Ben Jackson
b6a9cba52e Support the bash debugger
This required working around some sort of bug where the server returns
an invalid content length. Either that or we are somehow processing the
same message twice with additional escaping? It's really strange.
2018-05-29 00:39:37 +01:00
Ben Jackson
bac30acff3 Refactor config file to set adapter properties independently
This can later be extended to set adapter properties globally.
2018-05-28 16:11:11 +01:00
Ben Jackson
b02d35e78d Very hacky: Support for attach
This introduced more hacks than it should. In particular, the sequence
about stack trace requesting became very messy. When we attach, we don't
instantly get a stopped event. This required making the Pause command
actually work (sort of). In this case we often won't have a proper
current thread.

Instead we sort of request all threads whenever we get a thread event,
thought his is horribly hacky and we should really just use the thread
event as-is. We then attempt to pause ALL threads on pause and continue
requests when we don't know the current thread.

Another issue is that when pausing it's likely we don't have the source
location info for the pause location (something like select() or
whatever), so we only set the current frame to the lowest one we have
source for. This sort of roughly matches what you want.

This whole thing makes it clear that threads and stack trace in separate
panes makes no sense. We need to replicate the hierarchy in the
variables view for threads and stack traces.
2018-05-27 23:40:37 +01:00
Ben Jackson
4e3abde86d Fix setting of line breakpoints
The problem was simply that I was sending the wrong key for the file
path. Sigh. Also update the ms debugger and fix a traceback.
2018-05-26 18:49:23 +01:00
Ben Jackson
cd8f35e0f5 Add POC python support 2018-05-22 00:43:10 +01:00
Ben Jackson
269d09b73e Very basic support for launch configuration
This change refactors the way we launch the job and puts it all in an
internal namespace. Having done that, we are able to launch the job from
the python side. This allows us to neatly load a json file, simlar in
format to .vscode's launch.json, but sufficiently different that users
won't just expect the launch.json to work.

This change allows selecting between 2 different adapters to debug the
same c program.
2018-05-21 23:44:06 +01:00