Commit graph

371 commits

Author SHA1 Message Date
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
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
cposture
b65d9536ad update gadgets vscode-go version 2020-12-15 00:22:35 +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
Ben Jackson
5b88837919 Print the correct version for a git tag 2020-11-16 20:14:39 +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
Eduardo Mezêncio
2819e224e7 Add lua support through local-lua-debugger-vscode
Add the lua adapter to gadgets.py and installer.py, update the README.md
file and create basic tests using lua, luajit and love.
2020-11-14 19:34:15 -03:00
mergify[bot]
5ae3d9f336
Merge branch 'master' into codelldb-default 2020-11-09 22:41:50 +00:00
Ben Jackson
2225735b80 Recommend CodeLLDB 2020-11-09 22:23:37 +00:00
Ben Jackson
fb86ef924b Update netcoredbg 2020-11-09 21:57:47 +00: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
0d112d70a0 Add SetLineBreakpoint and ClaerLineBreakpoint APIs
These are useful for running tests (i.e. ensure there's a breakpiont at
the start of the test) and/or other programmatic usages.

They will also be needed for setting temporary breakpionts.
2020-10-17 22:40:08 +01:00
Camilo Schoeningh
ea36b60a07
vscode-go: Update version and use new repository.
As of June 2020, the vscode-go repository has moved to https://github.com/golang/vscode-go.
2020-10-14 21:21:11 +02:00
Ben Jackson
f3c5944dd2 Java: Set cwd by default 2020-10-14 15:26:54 +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
b2f41643f4 Add double-click to expand/collapse 2020-09-27 13:14:09 +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
069224e28d Allow defaults for variables with multiple underscore characters 2020-09-25 16:36:19 +01:00
Ben Jackson
6fd4724189 Launch remote commands in a termianl
This allows stdin and mans you don't need the output window visible to
see the useful process output when debugging a remote-Launch.
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
4424969028 Fix installation issues on windows - find npm.cmd 2020-09-18 20:59:21 +01:00
Ben Jackson
3aa949431e Upgrade chrome debugger to 4.12.10 2020-09-03 22:11:57 +01:00
Ben Jackson
97bdb0d0cc Show launch failure reason in the splash 2020-09-03 22:09:22 +01:00
Ben Jackson
733843a6d4 Support completion for console and watches.
Add omnifunc for prompt buffers

This synchronous completion can be used with any completion system
including built-in CTRL-X CTRL-O.

The filetype of the prompt buffers is set to VimspectorPrompt so that it
can be identified by completion systems. For example, this works well
with YCM:

let g:ycm_semantic_triggers =  {
  \   'VimspectorPrompt': [ '.', '->', ':', '<' ]
  \ }
2020-09-03 17:48:46 +01:00
Ben Jackson
dffd65f241 Use CursorLine highlihgt to highlight current PC line 2020-09-01 16:31:25 +01:00
Ben Jackson
b2456b587f Centralise the default settings 2020-09-01 16:31:04 +01:00
Ben Jackson
f538102d33 Don't leak buffers when creating output view 2020-09-01 15:40:16 +01:00