Commit graph

31 commits

Author SHA1 Message Date
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
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
bbd4d6b430 Fix oops on Stop 2018-05-22 01:00:43 +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
66dd8ceb84 Remove duplicate sign id 2018-05-21 00:18:23 +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
5a09914ee7 Dont mess up other window placment 2018-05-20 21:54:27 +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
Ben Jackson
7c02dd692a Make the scratch windows the same size 2018-05-20 21:09:54 +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
Ben Jackson
cd2ccedcb6 Talk to a job from python
Very very basic inital checkin to show a way to talk to/from a Vim job
using python (mainly), and to parse the sort of messages that LSP and
VSCode debugger protocol speak (i.e. similar to http messages).

Very hacky, sort of holds together for what it is.
2018-05-16 02:31:23 +01:00