Commit graph

37 commits

Author SHA1 Message Date
Ben Jackson
99faf76dcc Fix traceback when a request is rejected 2020-07-06 10:38:53 +01:00
Ben Jackson
355f0f0e0c Implement command line completion for watch/eval 2020-01-17 00:02:24 +00:00
Ben Jackson
4f31c95aa4 Fix flake8 errors 2019-04-27 14:21:26 +01:00
Ben Jackson
e80c874e3b Toggle the state before handling the message. I think this implies there is some re-entrancy here that i am not handling correctly, but this fixes an issue with vscode-python (for now) 2019-04-02 16:27:37 +01:00
Ben Jackson
32e16d9daf WIP: Try and remember that the server quit 2019-02-02 15:49:22 +00:00
Ben Jackson
f210d5d150 Print failures to the UI 2019-02-02 10:44:18 +00:00
Ben Jackson
e9d9a8ac42 Don't print raw output anymore 2019-02-02 10:43:12 +00:00
Ben Jackson
4539ad327f Remove pointless assignment 2019-01-12 15:14:06 +00:00
Ben Jackson
0cfe1ec99b Work around cppdbg spamming mono errors to stdout 2018-12-20 16:55:14 +00:00
Ben Jackson
ea1962e11b Use a short timeout for closedown 2018-12-20 16:54:55 +00:00
Ben Jackson
af338669f3 Add timeout for requests. 2018-12-20 15:10:24 +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
87db1e3478 Properly responsd to server reverse-request 2018-12-19 00:44:33 +00:00
Ben Jackson
62e9335a10 Support runInTerminal (sort of) 2018-12-16 19:13:10 +00:00
Ben Jackson
88ac7f6d55 Marginally improve the hover text
Don't use the default padded display.
When the request fails, say why.
Include the type if known.
2018-06-03 21:43:45 +01:00
Ben Jackson
faf0cefb82 Use the formatted message, unformatted, if there is no other message 2018-06-01 19:55:05 +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
ace8a4d736 Don't break the parser on message handling exceptions 2018-05-28 11:30:19 +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
eeabd00b4a Handle debug and terminated events
Somewhat at least.
2018-05-26 22:03:39 +01:00
Ben Jackson
c9a45b3bdc First attempt to make breakpoints work. Doesn't. Python at least responds with the breakpoints. MS CPP does not, and native debug just throws an error 2018-05-22 23:59:15 +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
Ben Jackson
fa84bf7ffc Refactor: Put the code window stuff in its own file 2018-05-21 00:17:26 +01:00
Ben Jackson
074c946d20 At program counter sign
Currently at its most trivial
2018-05-20 22:30:42 +01:00
Ben Jackson
ef5ac26f48 Fix error reporting and update demo 2018-05-20 22:03:49 +01:00
Ben Jackson
e5405ac059 Tidy API and document scopes 2018-05-20 21:09:36 +01:00
Ben Jackson
0650b5a514 Refactor: Split VariablesView into own file
This also moves all handling of message dispatch to the connection
object. That seems fine and the requirements of a "handler" are:

- implement OnEvent_<event> for any unsolicited events

Otherwise, requests are handled still by callbacks.
2018-05-20 20:50:48 +01:00
Ben Jackson
5927a1190e Refactor: Extract the variables view into another object 2018-05-20 19:40:08 +01:00
Ben Jackson
a535d65b26 Hierarchical variables and scopes
Maintain the variables in a simple tree and allow the user to
expand/collapse in the dumbest way possible. This means we don't
recursively consume all of the possible variable scopes.
2018-05-20 19:07:44 +01:00
Ben Jackson
a5c773932e Add Pause command 2018-05-20 18:09:19 +01:00
Ben Jackson
b15c4a0902 Support display of variables (sort of)
This displays the entire hierarchy in a window. This is about as
inefficient as could possibly be, but for trivial things allows you to
see the variables at least.
2018-05-20 18:08:15 +01:00
Ben Jackson
bd3a74970e Tidy the output window 2018-05-20 16:19:00 +01:00
Ben Jackson
f55dc8cd8e StepOut and Continue 2018-05-20 16:18:40 +01:00
Ben Jackson
8437397491 Actually connect to a real debug server and add some basic debugging
UI is totally placeholder
Step over/step in are the only supported commands
Hardcoded launch config using a specific debug adapter that happened to
work
Adds a trivial log file hack and fixes the protocol handler for bytes
2018-05-20 15:11:58 +01:00