Commit graph

397 commits

Author SHA1 Message Date
Ben Jackson
64e38b57ab Fix crash; enable syntax highlighting in hover popup; use a Watch for the popup and re-use existing drawing code 2021-02-21 17:01:41 +00:00
dsych
e0b1d6ed81 fixing linting errors in python files 2021-02-21 17:01:41 +00:00
dsych
3c857cebf4 dynamically adjusting window size for nvim's floating window based on the buffer size 2021-02-21 17:01:41 +00:00
dsych
2f1c93a2ac only diplaying relevant info like name and value for nested types and value only for simple types 2021-02-21 17:01:41 +00:00
dsych
b9ed7f34b4 removing redundant name for simple types, shortening variable type to 20 char and variable value to 100 chars to avoid overflowing tooltip window if the wrapped line is longer than the max size of the tooltip 2021-02-21 17:01:41 +00:00
dsych
04a5e889f9 making sure that float window is not modifiable inside nvim 2021-02-21 17:01:41 +00:00
dsych
f60b259dbc adding type information for simple types 2021-02-21 17:01:41 +00:00
dsych
d2990d7bae making sure to open popup relative to cursor 2021-02-21 17:01:41 +00:00
dsych
819d6366ac fully implemented the hover function for vim 2021-02-21 17:01:38 +00:00
dsych
4e994968ff added popup support for vim, still need to figure out how to expand variables 2021-02-21 17:00:47 +00:00
dsych
7432be9532 implemented dynamic float windows for nvim 2021-02-21 17:00:47 +00:00
dsych
07858cc250 adding on the fly eval of inside a floating window 2021-02-21 17:00:47 +00:00
dsych
4c0ba92ac6 working on variables view 2021-02-21 17:00:47 +00:00
dsych
7c4eef9096 finally got float window working with variable evaluation 2021-02-21 17:00:47 +00:00
Mark Wu
0cc4322b18 Update vscode-php-debug to 1.14.9, it works for both Xdebug 2/3 2021-02-10 20:01:18 +08: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
205eb7cdb3
Merge branch 'master' into master 2021-01-09 10:33:38 +00:00
Ben Jackson
d52eb3a6e9 Fix thread state and PC for starting node app
The problem is the sequence of events sent by the debug adapter.
Vimspector requests threads:

* When the initialisation exchange completes (requests all threads)
* Whenever a thread event is received
* whenever a stopped event is received.

If any of those happens while any other request is in progress, we cache
the request and handle it later. The latest request is processed when
the response to the outstanding request is received.

The problem is if the event is a stopped event, it is the handling of
the threads request that actually sets the thread state internally to
stopped. In a sequence where the first event is a stopped event, we end
up discarding the stopped event. like:

1. Stopped event (thread 1 = stopped) (request threads)
2. Initialisation complete (cache request)
3. threads response received (discard response and process cached request)
4. response received (but forgotten about the stopped event).

The solution is to always process the thread response, even if we send
the cached request. To avoid flicker, we don't draw the screen, or
expand any threads/stacks in the case where we're sending a cached
request.
2021-01-08 11:35:01 +00:00
Ben Jackson
38ed75dda7
Merge branch 'master' into master 2021-01-06 09:56:40 +00:00
Ben Jackson
0ad826704b
Merge branch 'master' into master 2021-01-06 09:54:16 +00:00
Gabriel Filion
7bd22d2bbd bump debugpy gadget to version 1.2.1
1.2.1 is, as of this commit, the most recent version of the gadget.

The version currently used, 1.0.0b12 is not compatible with Python 3.9:
the build errors out on missing arguments for _PyEval_EvalFrameDefault.

Python 3.9 is the version of Python that will be shipped with the
upcoming debian release.

Support for 3.9 was merged in before the final 1.0.0 version. So,
upgrading the gadget will bring in python 3.9 support
2021-01-02 15:46:53 -05:00
Allan Guigou
47c404f823 Allow a gadget to specify a custom extension path
When installing a custom gadget not officially supported by vimspector the
default extension path is 'extension', this works for vscode extensions but
does not support some debug adapters. This commit gives the ability to change
that default extension path by specifying 'extension_path' within the gadget
installer file.

Installing 'cust_adapter' would use the extension path 'adapter' rather
than 'extension' (ie ${gadgetDir}/cust_adapter/${version}/root/adapter)

{
  "cust_adapter": {
    "download": { ... },
    "all": {
      "extension_path": "adapter",
      "adapters": { ... }
    }
  }
}
2020-12-24 14:55:40 -05:00
Ben Jackson
0942aa4523 Fix docker example for python
The example was was using 'launchCommand' which is not valid according
to the schema; it should be 'runCommand'.

But also, it never really worked. Vimspector would start the "adapter"
(in this case, try and connect to the TCP port) before running the
"prepare" commands, wich in this case would actually start debugpy
listening. So to solve that we run the prepare commands earlier.
Hopefully this won't cause a regression for Java and C++ remote attach,
which we don't really have tests for.

Finally, due to the way docker works, when you forward a port and
nothing is listening on it, docker _accepts_ the connection then
immediately drops it. This is _super_ annoying meaning that it looks to
vimspector liek the server instantly dies if it takes nonzero time for
the remote commands to open the port. So to solve this we add loaunch
and attach delays which can be configured in the adapter config. This
actually solves a prolem where the java debugger just takes agest to
attach on remote launch too.

(Finally, finally...) updated the vimspector schema to represent
the real launch/attach remote configuration, which was incorrectly
spec'd at the adapter level, but it's actually per launch/attach block.
2020-12-22 15:45:26 +00:00
Ben Jackson
f59ba048cb
Merge branch 'master' into master 2020-12-19 18:30:02 +00:00
Yatao Li
f20c4c9725 fix linter errors 2020-12-19 22:35:12 +08:00
Yatao Li
66130389c5 code format fixes, update docs 2020-12-15 16:25:26 +08:00
cposture
b65d9536ad update gadgets vscode-go version 2020-12-15 00:22:35 +08:00
Yatao Li
28c5534704 language list 2020-12-14 22:57:32 +08:00
Ben Jackson
8261cde3c9 Don't copy the environment to update it
This causes problems on windows, and is wasteful anyway. The subprocess
will pick up the environment from its parent.
2020-12-05 16:42:07 +00:00
Ben Jackson
2eac9ddff8 Print failure when watch expression errors 2020-12-02 15:26:30 +00:00
Ben Jackson
8e2d352eb8 Fix local adapter specs
Somehow we lost the ability to define adapters in the local
.vimspector.json, I think when GetConfigurations was added.

Put that feature back.
2020-11-30 10:19:02 +00:00
Ben Jackson
e15c50a4f4 Don't request strack trace if the thread isn't stopped 2020-11-28 00:17:42 +00:00
Ben Jackson
a9d0ebde0b Add mapping for Focus, and make focusing a stack frame focus the thread 2020-11-22 14:13:15 +00:00
Ben Jackson
82307ff1ba Correctly handle the 'continue' response when continuing a specific thread 2020-11-22 14:13:15 +00:00
Ben Jackson
8801c2dac4 Fix pause/continue of individual threads
work around buggy java server sending invalid threads response.

java server supports this separate threads running/paused as a test
case.
2020-11-22 14:13:14 +00:00
Ben Jackson
e1c1347bdd Fix lint 2020-11-22 14:13:14 +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
8e3a734141 Support continued event properly 2020-11-22 14:13:14 +00:00
Ben Jackson
0f0d684e92 FixUp: comment about why we apply thread state in consume_threads 2020-11-22 14:13:14 +00:00
Ben Jackson
f0785c11f2 Allow pausing individual threads (in theory) 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
07ec08e664 Fix clearing temp breakpoints - ensure that the isngs are undisplayed 2020-11-22 13:25:10 +00:00
Ben Jackson
87ce1734ea Update vscode-go to latest version 2020-11-22 12:31:21 +00:00
Ben Jackson
b36f9e893a Work around neovim WinBar rendering bug 2020-11-19 23:29:13 +00:00
Ben Jackson
47c2cef2a1 Use a tag for tclpro to avoid installing every time 2020-11-16 21:17:36 +00:00
Ben Jackson
cd3b5f5baa Update mono debug; even though it doesn't work 2020-11-16 21:17:22 +00:00