on master help sign in
feat(csharp,debug): add C# debugger support (#4213)
2457111Filip Dutescu
helix-dap/src/types.rs+1−1
@@ -726,7 +726,7 @@ pub mod events {
726 #[serde(tag = "event", content = "body")]
726 #[serde(tag = "event", content = "body")]
727 // seq is omitted as unused and is not sent by some implementations
727 // seq is omitted as unused and is not sent by some implementations
728 pub enum Event {
728 pub enum Event {
729− Initialized,
729+ Initialized(Option<DebuggerCapabilities>),
730 Stopped(Stopped),
730 Stopped(Stopped),
731 Continued(Continued),
731 Continued(Continued),
732 Exited(Exited),
732 Exited(Exited),
helix-view/src/handlers/dap.rs+1−1
@@ -262,7 +262,7 @@ impl Editor {
262 log::info!("{}", output);
262 log::info!("{}", output);
263 self.set_status(format!("{} {}", prefix, output));
263 self.set_status(format!("{} {}", prefix, output));
264 }
264 }
265− Event::Initialized => {
265+ Event::Initialized(_) => {
266 // send existing breakpoints
266 // send existing breakpoints
267 for (path, breakpoints) in &mut self.breakpoints {
267 for (path, breakpoints) in &mut self.breakpoints {
268 // TODO: call futures in parallel, await all
268 // TODO: call futures in parallel, await all
languages.toml+19
@@ -233,6 +233,25 @@ comment-token = "//"
233indent = { tab-width = 4, unit = "\t" }
233indent = { tab-width = 4, unit = "\t" }
234language-server = { command = "OmniSharp", args = [ "--languageserver" ] }
234language-server = { command = "OmniSharp", args = [ "--languageserver" ] }
235
235
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+
236[[grammar]]
255[[grammar]]
237name = "c-sharp"
256name = "c-sharp"
238source = { git = "https://github.com/tree-sitter/tree-sitter-c-sharp", rev = "5b60f99545fea00a33bbfae5be956f684c4c69e2" }
257source = { git = "https://github.com/tree-sitter/tree-sitter-c-sharp", rev = "5b60f99545fea00a33bbfae5be956f684c4c69e2" }