Skip to content

Commit 2457111

Browse files
authored
feat(csharp,debug): add C# debugger support (#4213)
1 parent 661f48d commit 2457111

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

helix-dap/src/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ pub mod events {
726726
#[serde(tag = "event", content = "body")]
727727
// seq is omitted as unused and is not sent by some implementations
728728
pub enum Event {
729-
Initialized,
729+
Initialized(Option<DebuggerCapabilities>),
730730
Stopped(Stopped),
731731
Continued(Continued),
732732
Exited(Exited),

helix-view/src/handlers/dap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ impl Editor {
262262
log::info!("{}", output);
263263
self.set_status(format!("{} {}", prefix, output));
264264
}
265-
Event::Initialized => {
265+
Event::Initialized(_) => {
266266
// send existing breakpoints
267267
for (path, breakpoints) in &mut self.breakpoints {
268268
// TODO: call futures in parallel, await all

languages.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,25 @@ comment-token = "//"
233233
indent = { tab-width = 4, unit = "\t" }
234234
language-server = { command = "OmniSharp", args = [ "--languageserver" ] }
235235

236+
[language.debugger]
237+
name = "netcoredbg"
238+
transport = "tcp"
239+
command = "netcoredbg"
240+
args = [ "--interpreter=vscode" ]
241+
port-arg = "--server={}"
242+
243+
[[language.debugger.templates]]
244+
name = "launch"
245+
request = "launch"
246+
completion = [ { name = "path to dll", completion = "filename" } ]
247+
args = { type = "coreclr", console = "internalConsole", internalConsoleOptions = "openOnSessionStart", program = "{0}" }
248+
249+
[[language.debugger.templates]]
250+
name = "attach"
251+
request = "attach"
252+
completion = [ "pid" ]
253+
args = { processId = "{0}" }
254+
236255
[[grammar]]
237256
name = "c-sharp"
238257
source = { git = "https://github.com/tree-sitter/tree-sitter-c-sharp", rev = "5b60f99545fea00a33bbfae5be956f684c4c69e2" }

0 commit comments

Comments
 (0)