Commit graph

29 commits

Author SHA1 Message Date
Ben Jackson
c103e2adf5 Make sure we can still request threads if one threads request fails 2020-05-12 19:30:00 +01:00
Ben Jackson
cd26e81fd9 When requesting source from debugger, use the path, if supplied 2020-02-23 16:12:35 +00:00
Ben Jackson
926029e343 Set some window options to their deafults 2020-02-16 22:30:55 +00:00
Ben Jackson
19cc58f09e Set syntax in stack trace too 2020-02-04 13:04:09 +00:00
Ben Jackson
55bb50d296 line sometiems not supplied; source is optional 2020-01-10 09:28:02 +00:00
Ben Jackson
6944cb7c1f Fix tracebnack when no source in stack frame 2019-12-22 21:33:16 +00:00
Ben Jackson
28b6964aea Support sourceReferences and Source request 2019-11-02 09:34:59 +00:00
Ben Jackson
63f8543d8f The chrome debugger doesn't return 'line' in some stack frames. Fix a bug for expensive scopes 2019-10-06 22:19:19 +01:00
Ben Jackson
4f31c95aa4 Fix flake8 errors 2019-04-27 14:21:26 +01:00
Ben Jackson
305309dcb1 WIP: Don't send many outstanding threads requests 2019-02-12 12:33:40 +00:00
Ben Jackson
e006b15100 More improvements to startup and closedown stability. Remove some hack code 2019-02-12 09:01:09 +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
920db068c6 Use a prompt buffer for adding watches
This very new feature makes it kind of nice to add new watches in the
place where they will appear, keeping the eye in the same screen
location.
2018-06-09 22:33:22 +01:00
Ben Jackson
df10cd84cf Tidy up the buffer append logic
Vim seems to insist that a buffer has at least one line. This means that
the first line set in the buffer object has to be a special case. Sigh.
Create a method to wrap that up.
2018-06-03 17:16:20 +01:00
Ben Jackson
fa775f4499 Separate watches and scopes
They are related (and share code) but make more sense separately
2018-06-03 00:20:07 +01:00
Ben Jackson
fcf19a6d52 More workarounds for free-and-loose-with-the-spec servers 2018-06-01 19:55:51 +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
306854cbd6 Keep trying to load a real stack frame until we find one 2018-05-29 00:46:39 +01:00
Ben Jackson
9baea25c46 Start to refactor breakpoints into different types
This basically stores line breakpoints as a map by file name. Soon to
come: function breakpoints and others.
2018-05-28 19:11:29 +01:00
Ben Jackson
ed703724ca Fix pause/continue/pause 2018-05-28 15:12:53 +01:00
Ben Jackson
5278cd17fe When stepping, try to only reload the current thread stack trace 2018-05-28 11:18:34 +01:00
Ben Jackson
5ed9a06ed5 Move the thread handling into the stack frame handling
This shows stack traces as children of a thread, removing one of the
UI splits. However, we still have the somewhat awkward concepts of
"current" thread and "current" stack frame. These are messy and
incredibly fiddly. And in any case, probably wrong _most_ of the time.
2018-05-28 02:34:05 +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
7600e1e652 Add a reset command to undo all the UI and reset everything 2018-05-27 21:40:31 +01:00
Ben Jackson
6aecfb969b Very basic balloon support.
This is a huge hack, setting it manually and never resetting it. Just
displaying the value (no breakdown) etc.

I'm tempted to drop this functionality altogether as it is of limited
use when you have the locals and watch windows.
2018-05-27 20:23:25 +01:00
Ben Jackson
7e76c9763d Name the buffers so it's clearer what they do
This actually restricts us to a single debugging pane, but that's really
already a restriction of the vim-side (only one job, etc.). Support for
multiple sessions isn't a priority.
2018-05-27 18:34:39 +01:00
Ben Jackson
eeabd00b4a Handle debug and terminated events
Somewhat at least.
2018-05-26 22:03:39 +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
fa627712e2 Support jumping up/down the stack
Split out stack trace view into its own thing. Support jumping to code
location.
2018-05-20 21:38:11 +01:00