Commit graph

128 commits

Author SHA1 Message Date
Ben Jackson
aacd62f09f Rename AssertMatchist -> AssertMatchList 2021-05-15 16:06:16 +01:00
Ben Jackson
9113dbb698 stack_trace: Add cursorline highlight and sign for current frame 2021-05-11 19:44:42 +01:00
Ben Jackson
f389d65a24 Add a test for csharp, run in CI 2021-04-15 21:09:09 +01:00
Ben Jackson
a41db89523 Fix get_configurations test 2021-04-13 18:01:10 +01:00
mergify[bot]
2b24611036
Merge branch 'master' into fix-calculus 2021-03-12 22:08:52 +00:00
Ben Jackson
a53d68f043 Add up and down frame mappings 2021-03-12 21:27:56 +00:00
Ben Jackson
6d3f3e207b Fix default variable values having substitutions from the calculus 2021-03-12 20:15:45 +00:00
Ben Jackson
2615cff97a If there isn't enough vertical space, we get vim errors (not enough room), so don't do that 2021-03-11 21:14:30 +00:00
Ben Jackson
7d2770f3c4 Add vertical (i.e. narrow) layout
This puts the 3 utility windows at the top, horizontally split, with the
code view below.  The terminal window is drawn either vertically split
(if there's room) or horizontally split otherwise.  The output window
remains at tht bottom.

We add equivalent sizing options too, setting some defauts that roughly
work on my macbook pro.

We try to guess the best layout to use. In particular we go into
'narrow' mode if there are not enough horizonal columns to fit the
sidebar, code and at least the minimum terminal size. We also try to
move the terminal to be horizontally spit (i.e. vertically stacked) if
we can fit the max number of lines, but only the min number of columns.

This is all a little heuristic, but when testing it myself, it feels
good and tends to pick a good option by default. Users can always
customise the ui mode (g:vimspector_ui_mode and all the various specific
width options)
2021-03-10 23:44:45 +00:00
Ben Jackson
d2b92b7ce5 Fix crash using STop function 2021-03-02 11:12:01 +00:00
Ben Jackson
06f9bfc057 Add basic tests for set variable value 2021-02-25 22:15:09 +00:00
Jake Zimmerman
11edcddd9c
Fix using double-quotes in VimspectorEval
The VimspectorEval command used `-bar` but this prevented the use of double quotes. This seems much more useful than a vim comment in this scenario, so remove the `-bar`.

This is _techncially_ breaking change, but I don't think it's likely anyone will be relying on doing `VimspectorEval x | something else`. If they are, sorry.
2021-02-25 11:04:12 +00:00
Ben Jackson
3c7311e33a Test that the commands are fired when stepping through and continuing 2021-02-21 20:49:56 +00:00
przepompownia
bcf4120ba4 Do not send event after leave buffer. 2021-02-21 19:17:09 +00:00
__
840ee09242 Send an event before leave buffer in window 2021-02-21 19:17:09 +00:00
__
0bb8416e11 Add test 2021-02-21 19:17:09 +00:00
Ben Jackson
5754e96067 FixUp: Change of mapleader 2021-02-21 18:24:26 +00:00
Ben Jackson
5a1eb9250a Fix test now that we're using a mapping 2021-02-21 17:01:41 +00:00
dsych
8c39a861bd hopefully fixing tests on mac 2021-02-21 17:01:41 +00:00
dsych
639e89f5db fixing linting 2021-02-21 17:01:41 +00:00
dsych
5a23ec5beb adding tests for select range, invalid eval and expand/collapse 2021-02-21 17:01:41 +00:00
dsych
0c79384529 there is no need to execute feedkeys inside a popup context, since keys are added into the global input buffer 2021-02-21 17:01:41 +00:00
dsych
789377eab4 adding the first test! 2021-02-21 17:01:41 +00:00
Ben Jackson
7f77842ab8 Make sure that tests fail properly; ensure that empty string is a valid default 2021-02-06 22:08:08 +00:00
Ben Jackson
30eec0d93c Fix variable substitution for multiple defaulted vars
The problem was that the python regex engine is strictly left-to-right,
so matching `[^}]|\\}` against \\}} meant that the `\\` was consumed by
the left of the `|`. The solution is to just switch them around.

Also add a way to run python tests from within vim, so we can actually
test this stuff.
2021-02-06 20:55:24 +00:00
Ben Jackson
2eac9ddff8 Print failure when watch expression errors 2020-12-02 15:26:30 +00:00
Eduardo Mezêncio
4f03e4f65a Improve lua configuration and test files
Change lua test files to call `require 'lldebugger'` only when using
love, because it's not needed with lua or luajit. Also add `stopOnEntry`
key to test `.vimspector.json` because it works correctly with this
change.
2020-11-22 18:38:40 -03:00
Ben Jackson
5ab92a7e67 Breakpont tests too flaky 2020-11-22 14:54:02 +00:00
Ben Jackson
7d5ad3ffa1 Another flaky test 2020-11-22 14:13:15 +00:00
Ben Jackson
c769e8a479 Fix up the tests to work in linux container too 2020-11-22 14:13:14 +00:00
Ben Jackson
53b1d12447 Allow setting the current thread, use a sign to highlight the line with the current thread 2020-11-22 14:13:14 +00:00
Ben Jackson
42cdff043a Redraw the screen each 20 retries
This allows us to eyeball why something is failing
2020-11-22 14:13:14 +00:00
Ben Jackson
a5d66a7477 Correctly track and now actually report running/paused status
It's quirky, we have to pass the stopped event to LoadThreads so that it
can correctly work out the state of any _newly_ added threads. We now
also correctly apply the allThreadsStopped=False behaviour where you
must not allow expansion of such threads (in theory, that's untested).
2020-11-22 14:13:14 +00:00
Ben Jackson
2399a79cae start to track individual thread state 2020-11-22 14:13:14 +00:00
Ben Jackson
e9e0e9e5b9 Test for new thread creation
- don't clear the stack trace on continue - track running status
  properly (ish)
- mark threads (running) when the app is executing
- indicate the "current" thread with a different icon

TODO:
- allow user to specify current thread?
- track running status of threads individually?
- allow to pause/continue specific threads?
2020-11-22 14:13:14 +00:00
Ben Jackson
e2ca9b5318 Threads tests WIP 2020-11-22 14:13:14 +00:00
Ben Jackson
f87aa4aa19 Undo flakiness hack 2020-11-22 13:30:14 +00:00
Ben Jackson
3330c704d7 Too many flakes 2020-11-22 12:46:15 +00:00
Eduardo Mezêncio
85865e0012 Add regression tests for lua support
Change Dockerfile to install lua, luajit and love and also to install
nodejs 12 needed to build the lua debug adapter. Create the
love-headless test in support/test/lua to test love without an x server.
2020-11-16 15:08:55 -03:00
Emmanuel Thompson
d5b9411256 Add a GetConfigurations function 2020-11-06 12:05:14 -05:00
Ben Jackson
80985148e7 Add "run to cursor" support
We add a 'temporary' option to line breakpionts and try and clear any
temporary breakpionts on the line we end up stopping on. This might not
be art, but _probably_ works in almost all cases that matter.

it's a bit hacky the way we have to push the reason around, but we don't
know where we stopped until we actually get the stack trace response and
SetCurrentFrame

Move temporary breakpionts to match server response

Also delete any existing ones when adding a new one and add tests for
run-to-cursor.

Only continue after we successfully set the breakpoints. This makes it
work in go
2020-10-23 22:53:04 +01:00
Ben Jackson
1b9763a4fc Minor improvements to console usage
Display failures and stop adding random text which makes the (very
useful) CodeLLDB interface look messy
2020-10-10 16:20:55 +01:00
Ben Jackson
16f22b396f Fix breakpoint event
Few problems:
 - we were passing a dict instead of a list of breakpoints
 - if the breakpoint had a source which was {} we crashed
 - we didn't support the 'removed' event
2020-10-10 16:04:46 +01:00
Ben Jackson
bd09206caf While debugging, use the correct path for breakpoints 2020-09-27 22:47:22 +01:00
Ben Jackson
b34ccd679d Fix ambiwidth=double again and make sure it doesn't break again 2020-09-25 16:36:19 +01:00
Ben Jackson
2ad1a3e502 Display a different sign when there's a breakpoint on the PC line
Vim only renders a single sign-per-line. If we have the PC _and_ a
breakpoint, we should make that clear. Do this using a vimspectorPCBP
sign which combines both vimspectorPC and vimspectorBP (sort of).

We can't (unfortuantely) render the breakpoint blob in a different
colour, but it's at least obvious when we toggle on the PC line.
2020-09-19 15:18:05 +01:00
Ben Jackson
26277cefbd Another flaky test 2020-09-19 11:36:28 +01:00
Ben Jackson
ce4f341feb Correct some typos 2020-09-19 11:25:53 +01:00
Ben Jackson
4ed9158282 Accomodate flaky tests that I can't diagnose 2020-09-19 11:18:40 +01:00
Ben Jackson
277994e27c Add missing test file 2020-09-11 15:56:04 +01:00