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

pull/4307/head
Filip Dutescu 2 years ago committed by GitHub
parent 661f48d62f
commit 2457111bf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -726,7 +726,7 @@ pub mod events {
#[serde(tag = "event", content = "body")] #[serde(tag = "event", content = "body")]
// seq is omitted as unused and is not sent by some implementations // seq is omitted as unused and is not sent by some implementations
pub enum Event { pub enum Event {
Initialized, Initialized(Option<DebuggerCapabilities>),
Stopped(Stopped), Stopped(Stopped),
Continued(Continued), Continued(Continued),
Exited(Exited), Exited(Exited),

@ -262,7 +262,7 @@ impl Editor {
log::info!("{}", output); log::info!("{}", output);
self.set_status(format!("{} {}", prefix, output)); self.set_status(format!("{} {}", prefix, output));
} }
Event::Initialized => { Event::Initialized(_) => {
// send existing breakpoints // send existing breakpoints
for (path, breakpoints) in &mut self.breakpoints { for (path, breakpoints) in &mut self.breakpoints {
// TODO: call futures in parallel, await all // TODO: call futures in parallel, await all

@ -233,6 +233,25 @@ comment-token = "//"
indent = { tab-width = 4, unit = "\t" } indent = { tab-width = 4, unit = "\t" }
language-server = { command = "OmniSharp", args = [ "--languageserver" ] } 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]] [[grammar]]
name = "c-sharp" name = "c-sharp"
source = { git = "https://github.com/tree-sitter/tree-sitter-c-sharp", rev = "5b60f99545fea00a33bbfae5be956f684c4c69e2" } source = { git = "https://github.com/tree-sitter/tree-sitter-c-sharp", rev = "5b60f99545fea00a33bbfae5be956f684c4c69e2" }

Loading…
Cancel
Save