Commit Graph

126 Commits (main)

Author SHA1 Message Date
A-Walrus 8839eb0af4
Fix unwrap bug in DAP (#6786) 1 year ago
Filip Dutescu d59b80514e
feat(debug): highlight current line (#5957)
Add new theme highlight keys, for setting the colour of the breakpoint
character and the current line at which execution has been paused at.
The two new keys are `ui.highlight.frameline` and `ui.debug.breakpoint`.
Highlight according to those keys, both the line at which debugging
is paused at and the breakpoint indicator.

Add an indicator for the current line at which execution is paused
at, themed by the `ui.debug.active` theme scope. Update various themes
to showcase how the new functionality works.

Better icons are dependent on #2869, and as such will be handled in the
future, once it lands.

Closes: #5952

Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
1 year ago
Filip Dutescu 376c19e06b
feat(dap): implement Restart request (#5651)
Add a restart debug session command, which would issue a
[Restart Request][1], if the debugger supports it and a session is
running. It uses the same arguments and requests used to start the
initial session, when recreating it.

It builds upon #5532, making use of the changes to the termination
workflow of a session.

[1]: https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Restart

Closes: #5594

Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
1 year ago
Filip Dutescu e3765ac6d2
feat(dap): send Disconnect if Terminated event received (#5532)
Send a `Disconnect` DAP request if the `Terminated` event is received.
According to the specification, if the debugging session was started by
as `launch`, the debuggee should be terminated alongside the session. If
instead the session was started as `attach`, it should not be disposed of.

This default behaviour can be overriden if the `supportTerminateDebuggee`
capability is supported by the adapter, through the `Disconnect` request
`terminateDebuggee` argument, as described in
[the specification][discon-spec].

This also implies saving the starting command for a debug sessions, in
order to decide which behaviour should be used, as well as validating the
capabilities of the adapter, in order to decide what the disconnect should
do.

An additional change made is handling of the `Exited` event, showing a
message if the exit code is different than `0`, for the user to be aware
off the termination failure.

[discon-spec]: https://microsoft.github.io/debug-adapter-protocol/specification#Requests_Disconnect

Closes: #4674

Signed-off-by: Filip Dutescu <filip.dutescu@gmail.com>
1 year ago
xiaoma20082008 ce0837dbb7
DAP: Add request ID to request timeout message (#6018)
This improves error logging for dap requests. Without the ID
it's hard to know which request is the one that timed out.
1 year ago
dependabot[bot] 64ec0256d3
build(deps): bump which from 4.3.0 to 4.4.0 (#5655)
Bumps [which](https://github.com/harryfei/which-rs) from 4.3.0 to 4.4.0.
- [Release notes](https://github.com/harryfei/which-rs/releases)
- [Commits](https://github.com/harryfei/which-rs/compare/4.3.0...4.4.0)

---
updated-dependencies:
- dependency-name: which
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1 year ago
taupiqueur 3ca42f7787
Fix name of channel endpoints in DAP client (#5366) 1 year ago
Blaž Hrastnik c2c1280f02
Resolve a bunch of upcoming clippy lints 2 years ago
Filip Dutescu 2457111bf0
feat(csharp,debug): add C# debugger support (#4213) 2 years ago
Michael Davis 85411bed83 DAP: Make `cwd` required in RunTerminalArguments
The spec has `cwd` in `RunInTerminalRequestArguments` as non-optional:
https://microsoft.github.io/debug-adapter-protocol/specification#Reverse_Requests_RunInTerminal
2 years ago
Michael Davis 44f596334a DAP: Skip serializing `Option`s when `None`
DAP follows the same strict TypeScript interface syntax as LSP
which states:

> The document uses TypeScript interfaces in strict mode to describe
> these. This means for example that a `null` value has to be explicitly
> listed and that a mandatory property must be listed even if a falsify
> value might exist.

So we have to skip serializing any fields that end in `?` instead
of passing `null`.
2 years ago
Gokul Soumya 6e2aaed5c2
Reuse menu::Item trait in picker (#2814)
* Refactor menu::Item to accomodate external state

Will be useful for storing editor state when reused by pickers.

* Add some type aliases for readability

* Reuse menu::Item trait in picker

This opens the way for merging the menu and picker code in the
future, since a picker is essentially a menu + prompt. More
excitingly, this change will also allow aligning items in the
picker, which would be useful (for example) in the command palette
for aligning the descriptions to the left and the keybinds to
the right in two separate columns.

The item formatting of each picker has been kept as is, even though
there is room for improvement now that we can format the data into
columns, since that is better tackled in a separate PR.

* Rename menu::Item::EditorData to Data

* Call and inline filter_text() in sort_text() completion

* Rename diagnostic picker's Item::Data
2 years ago
Blaž Hrastnik 9712bbb23b
Use which to resolve lsp/dap binaries
This resolves the following issue: https://github.com/helix-editor/helix/discussions/962#discussioncomment-1580046
2 years ago
Blaž Hrastnik fd0e4b1159 dap: Reduce amount of block_on uses 2 years ago
Blaž Hrastnik bd549d8a20 Merge remote-tracking branch 'origin/master' into debug 2 years ago
Blaž Hrastnik dc8df7ba21 Make thread_picker non-blocking 2 years ago
Blaž Hrastnik 2b4de41bf0 dap: Reply to RunInTerminal 2 years ago
Blaž Hrastnik 5545f8ebb5 dap: Add RunInTerminal reverse request, support replying to requests 2 years ago
Blaž Hrastnik bcf70d8e67 dap: All of these calls don't need &mut 2 years ago
Blaž Hrastnik 43fbb6d965 Make dap_start non-blocking 2 years ago
Blaž Hrastnik 032aaffa15 dap: Split call/request in the same way LSP does 2 years ago
Blaž Hrastnik 2dbf966293 dap: Start working on runInTerminal support 2 years ago
Blaž Hrastnik 8ffafb826f dap: Rewrite breakpoints so that there's a single set maintained 2 years ago
Blaž Hrastnik 2bd8a9b39d dap: Consistently rename type as ty 3 years ago
Blaž Hrastnik 31b431bfdd dap: Remove Deref for DebuggerCapabilities
Looks like a mistake
3 years ago
Blaž Hrastnik 155c608237 dap: Drop examples 3 years ago
Blaž Hrastnik 9baddc825d dap: Get rid of excessive cloning 3 years ago
Blaž Hrastnik a5ea61433c dap: Bump helix-core 3 years ago
Blaž Hrastnik f2b709a3c3 Merge branch 'master' into debug 3 years ago
Blaž Hrastnik d6e8a44d85 dap: Fix examples 3 years ago
Blaž Hrastnik bda05ec4bf Use a newtype for ThreadId 3 years ago
Blaž Hrastnik 83a8167402 Invert core -> dap dependency 3 years ago
Blaž Hrastnik ea59f77a6b Port over parsing improvements from the LSP
We need to terminate if we ever read 0 bytes which indicates closed
stream.
3 years ago
Dmitry Sharshakov 814dcfa8d2
fix lints 3 years ago
Dmitry Sharshakov d943a51e3e
editor: add Node.js debugger 3 years ago
Dmitry Sharshakov 0e51e5fbaf
editor: support setExceptionBreakpoints 3 years ago
Dmitry Sharshakov 413e477dc2 lldb: use stdio transport by default 3 years ago
Dmitry Sharshakov 507a1f8dd6 Get breakpoint reports from debugger 3 years ago
Dmitry Sharshakov df0ea6674a examples: ensure target stopped by waiting for enter from user 3 years ago
Dmitry Sharshakov cf7237d0b9
compat: make thread IDs signed
Delve needs it
3 years ago
Blaž Hrastnik 7b61c63ece Handle stderr 3 years ago
Blaž Hrastnik b997d2cdeb dap: Allow setting breakpoints before starting the adapter 3 years ago
Blaž Hrastnik 289303a30d dap: small TODO 3 years ago
Blaž Hrastnik 42f9718f55 dap: Extract thread_picker, make pause explicitly select a thread 3 years ago
Blaž Hrastnik 27c1b3f98b dap: Extract a thread_states map 3 years ago
Dmitry Sharshakov 6265e196b7
compat: change lldb to lldb-vscode
This should be preferred ID, although now lldb-vscode works with any
3 years ago
Blaž Hrastnik 2c7b75475f dap: refactor frame handling 3 years ago
Blaž Hrastnik 986828e75c dap: Remap keys, match current thread behavior from dap-mode, switch-thread 3 years ago
Dmitry Sharshakov b42631942b
Defaults in completions, better schema 3 years ago
Dmitry Sharshakov 2d42766a71
wip: refactor parameters in UI start 3 years ago