Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(csharp,debug): add C# debugger support #4213

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion helix-dap/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ pub mod events {
#[serde(tag = "event", content = "body")]
// seq is omitted as unused and is not sent by some implementations
pub enum Event {
Initialized,
Initialized(Option<DebuggerCapabilities>),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks like Initialized extends Event which has an optional body field https://microsoft.github.io/debug-adapter-protocol/specification#Base_Protocol_Event

Stopped(Stopped),
Continued(Continued),
Exited(Exited),
Expand Down
2 changes: 1 addition & 1 deletion helix-view/src/handlers/dap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ impl Editor {
log::info!("{}", output);
self.set_status(format!("{} {}", prefix, output));
}
Event::Initialized => {
Event::Initialized(_) => {
// send existing breakpoints
for (path, breakpoints) in &mut self.breakpoints {
// TODO: call futures in parallel, await all
Expand Down
19 changes: 19 additions & 0 deletions languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,25 @@ comment-token = "//"
indent = { tab-width = 4, unit = "\t" }
language-server = { command = "OmniSharp", args = [ "--languageserver" ] }

[language.debugger]
name = "netcoredbg"
transport = "tcp"
command = "netcoredbg"
args = [ "--interpreter=vscode" ]
port-arg = "--server={}"

[[language.debugger.templates]]
name = "launch"
request = "launch"
completion = [ { name = "path to dll", completion = "filename" } ]
args = { type = "coreclr", console = "internalConsole", internalConsoleOptions = "openOnSessionStart", program = "{0}" }

[[language.debugger.templates]]
name = "attach"
request = "attach"
completion = [ "pid" ]
args = { processId = "{0}" }

[[grammar]]
name = "c-sharp"
source = { git = "https://github.com/tree-sitter/tree-sitter-c-sharp", rev = "5b60f99545fea00a33bbfae5be956f684c4c69e2" }
Expand Down