on master help sign in
feat(csharp,debug): add C# debugger support (#4213)
commit2457111bf074d4b5c1d45f76e2c7d593ceec5895 authorFilip Dutescu <filip.dutescu@gmail.com> dateSat 15 Oct 2022, 23:33 (4 years ago) parent661f48d
3 files changed+21−2
helix-dap/src/types.rs+1−1 helix-view/src/handlers/dap.rs+1−1 languages.toml+19
helix-dap/src/types.rs+1−1
@@ -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+1−1
@@ -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+19
@@ -233,6 +233,25 @@ comment-token = "//"
233233indent = { tab-width = 4, unit = "\t" }
234234language-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]]
237256name = "c-sharp"
238257source = { git = "https://github.com/tree-sitter/tree-sitter-c-sharp", rev = "5b60f99545fea00a33bbfae5be956f684c4c69e2" }