Commit graph

16 commits

Author SHA1 Message Date
Ben Jackson
be44a22903 Allow coercing a type in vimspector config
Initially I considered using #i, #s, etc. to coerce to specific types,
but then it wasn't clear of the semantics (particularly for bool, where
JSON bool true/false, Python bool True/False).

But it turns out that we can just coerce any key from a JSON string.
Users can _probably_ type JSON strings for most things, or use variables
to run scripts to generate them, this allows essentially complete
flexibility to define the data types needed to populate the launch spec.

The purpose of this is to allow some level of automated setup by
requesting data from the user and then (subsequently) saving the
flattneed config to the vimspector config file.
2020-08-05 22:19:38 +01:00
Ben Jackson
aa26d4bc1a Add ability to specify defaults for variables 2020-07-31 22:19:10 +01:00
Ben Jackson
7f625fee9f Upgrade debugpy 2020-06-08 19:58:52 +01:00
Ben Jackson
c6d6c7f876 Support "multi-session" mode properly
Document remote debugging and add a test
2020-05-17 14:07:56 +01:00
Ben Jackson
5cb9c62e7f Fix tab creation when current buffer contains no file 2020-03-28 13:07:00 +00:00
Ben Jackson
d42fd51f35 Support c-style comments in JSON
Debate rages about whether JSON should have comments. The specification
says it shouldn't but the author of JSON suggested that if you want to
use JSON for configuration, then pipe it through jsmin before parsing.

So that's what we do, using a tiny JSON minifier from
https://github.com/getify/JSON.minify/tree/python

Closes #135
2020-03-21 15:16:07 +00:00
Ben Jackson
de04598bc6 Clear exception breakpoints when calling ClearBreakpoints 2020-03-09 21:31:14 +00:00
Ben Jackson
1b7402915c Catch adapter being None and print user-friendly message: 2020-03-08 18:18:29 +00:00
Ben Jackson
a56bee7b0a Switch to debugpy over vscode-python
This is just better in every way, and the vscode-python typescript
adapter is being phased out.
2020-02-08 21:15:27 +00:00
Ben Jackson
6bcc58a39b Document how to use debugpy directly instead of vscode-python 2020-02-01 00:09:02 +00:00
Ben Jackson
7d046574cb Add tests for toggling breakpoint and inserting line 2019-12-14 18:03:34 +00:00
Ben Jackson
6ad172aef7 Demo of python attach 2019-10-26 13:10:44 +01:00
Ben Jackson
b64946e34c Remember user choices
There are 2 things we ask for input for:

- input variables
- exception breakpoints

It's irritating to have to repeat yourself when going through the
edit/debug loop.

Howver, cacheing has some quirks and disadvantages - they key one being
when to clear the cache. To resolve this we take two slightly different
approaches:

1. For input variables, we remember the choice of the user, but present
that only as the default, so they can just hit enter to accept it. We
already rememeber the choices for the length of the debug session (i.e.
across 'restart' calls).

2. For exception breakpoints, we remember the choices for as long as the
current session is running.

This allows users to hit the 'restart' button without being prompted at
all.

Meanwhile, we also remove the (broken) support for exception breakpoint
matchers and state the server default for exception breakpoint filters.
2019-10-05 22:20:33 +01:00
Ben Jackson
dcc2c6c365 Manual python test 2019-08-04 15:20:54 +01:00
Ben Jackson
ba0c11392d Fix python debugger again 2018-05-28 22:22:00 +01:00
Ben Jackson
b249b3c9e3 Add missing python test file 2018-05-22 01:26:11 +01:00