Commit graph

71 commits

Author SHA1 Message Date
Ben Jackson
22ffc43129 The +/- just makes it confusing 2018-06-03 22:02:09 +01: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
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
553ad95404 Simplify vim options changes 2018-06-03 14:29:51 +01:00
Ben Jackson
a5ee534c98 Fix errors when values contain ' 2018-06-03 00:37:06 +01:00
Ben Jackson
040746409b Put the watches between the vars and the scopes 2018-06-03 00:36:46 +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
298ff8cd9c Allow remote attach to gdbserver without pid picking 2018-06-01 19:55:32 +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
bd4fa964b0 Only add the log handler once 2018-06-01 19:54:27 +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
306854cbd6 Keep trying to load a real stack frame until we find one 2018-05-29 00:46:39 +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
ba0c11392d Fix python debugger again 2018-05-28 22:22:00 +01:00
Ben Jackson
46cdedc648 Trivial support for function breakpoints
You can't see them and you can't disable/cancel them.
2018-05-28 19:36:50 +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
979e796bf4 SOrt out the breakpoints TODO. There's still a lot to do in that space 2018-05-28 16:32:41 +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
9e0b68330e Tidy up the buffers and don't switch on new 2018-05-28 15:48:51 +01:00
Ben Jackson
f9ecf5f05d Move the output window to its own space
And separate all the different channels into their own buffers. Use the
WinBar to select between them.
2018-05-28 15:14:41 +01:00
Ben Jackson
ed703724ca Fix pause/continue/pause 2018-05-28 15:12:53 +01:00
Ben Jackson
eb11712cc1 Make sure to close down cleanly
This involves some horrible forceful reading on exit to ensure that we
get a response to the disconnect request. This ensures that any debugee
is killed cleanly.
2018-05-28 13:49:40 +01:00
Ben Jackson
afe4c0db77 Tidy breakpoints 2018-05-28 13:23:31 +01:00
Ben Jackson
4815c832f0 Only enable balloons when supported 2018-05-28 12:31:10 +01:00
Ben Jackson
ace8a4d736 Don't break the parser on message handling exceptions 2018-05-28 11:30:19 +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
539b6d5c13 Don't send configurationDone each time we set breakpoints 2018-05-28 11:18:18 +01:00
Ben Jackson
403b90a961 Reintroduce width 2018-05-28 11:17:58 +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
0a19048311 Don't try to expand variables that are not expandable 2018-05-27 23:59:36 +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
3f73d1c2f8 Allow deleting watches and improve expansion
Now scopes and watch results can be expanded/collapsed. Locals still
default to being expanded, but watches do not.
2018-05-27 18:19:07 +01:00
Ben Jackson
533b2aa0d5 Very basic support for watch expressions
You can currently only add them, not remoove them and you have to pass
the expression in the function call, but once added the variable
breakdown works nicely.
2018-05-27 16:59:06 +01:00
Ben Jackson
dd17f3f6f6 If there's only one config, just use it 2018-05-27 13:41:36 +01:00
Ben Jackson
73f8a66d2c Reset the connection when the channel closes 2018-05-27 13:41:23 +01:00
Ben Jackson
dbef05b9a5 support restarting via calling Launch again (todo: restart button doesn't work) 2018-05-27 00:04:56 +01:00
Ben Jackson
eeabd00b4a Handle debug and terminated events
Somewhat at least.
2018-05-26 22:03:39 +01:00
Ben Jackson
45a8176de3 remove pointless bothering message 2018-05-26 20:41:57 +01:00
Ben Jackson
7d3af848cf Separate out the display of 'requested' and 'applied' breakpoints
This is a mess, with a load of duplication, but it's a step. When you
request a breakpoint, we add one (in state ENABLED). You can then toggle
it again to change to DISABLED. And once more to delete it.

Once we start the debug server, that all changes and we just start
sending the breakpoints directly to the server and updating based on the
responses. This is far from ideal and somewhat jarring, but this
approach allows me to play around with ideas about what the user
experience should look like.
2018-05-26 19:54:45 +01:00
Ben Jackson
9d9c2214f3 Breakpoints returned from servers rarely have source set
For line-breakpoints we already know it, so just use what we said
originally. For method breakpoints, we have no clue. While some servers
return a line, it could be in any file, so we just ignore them.
2018-05-26 19:08:59 +01:00
Ben Jackson
d814091692 Support for legacy servers that use deprecated api? 2018-05-26 18:52:33 +01:00
Ben Jackson
76f26551fb Probably not working: allow unverified breakpoints 2018-05-26 18:52:09 +01:00
Ben Jackson
2ffea55e93 Store the current launch configuration rather than pass it arround
This allows me to play around with the launch sequence a bit more
freely, though it does lead to a cacheing issue.
2018-05-26 18:50:47 +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
c4aefc110c The reason this doesn't work is the servers don't realy populate the breakpoints list in the response. Also, the file:line breakpoints just simply down't work in c++ 2018-05-23 00:34:08 +01:00