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

Debugging story #407

Open
3 tasks
razzmatazz opened this issue Nov 19, 2017 · 10 comments
Open
3 tasks

Debugging story #407

razzmatazz opened this issue Nov 19, 2017 · 10 comments

Comments

@razzmatazz
Copy link
Contributor

razzmatazz commented Nov 19, 2017

We don't have any debugging story documented/suggested for our users.

We should:

  • suggest using sdb for mono projects
  • recommend alternative editors (VS Code has .NET debugging covered) – very reluctantly :)
  • attempt to integate at least a primitive form of debugger into the experience, via sdb+GUD maybe?. Not sure about the right way to do this though..
@kirill-gerasimenko
Copy link
Contributor

Hi, I just know that this one exists, but never tried it myself https://docs.microsoft.com/en-us/dotnet/framework/tools/mdbg-exe

@ghost
Copy link

ghost commented Jun 27, 2018

This would be amazing!

@Daniel-V1
Copy link

Daniel-V1 commented Aug 7, 2018

Have you seen these by any chance? Would it be helpful for this?

https://github.com/yyoncho/dap-mode
https://github.com/Samsung/netcoredbg

Looks like one editor is using netcoredbg via the Debug Adapater protocol already -
https://github.com/eclipse/aCute

@sebasmonia
Copy link

I would like to help with this but I can't find out what exactly the VS Code extension uses to debug.
I've found references to a debugger download for Linux but I'm running Windows.

Anyone knows?

@Daniel-V1
Copy link

Daniel-V1 commented May 7, 2019

So the VS Code extension uses a debugger that is not legally allowed to be used in other editors - see here (dotnet/core#505) for waaaaay too much information. Try not to get caught up in the resentment.

However, there is a another debugger from Samsung that has been open-sourced and is MIT licensed - referenced above, but it can be found https://github.com/Samsung/netcoredbg. I also referenced dap-mode above, but I think at this point it might be a lost cause for this case because omnisharp-roslyn people don't seem to really care about the lsp implementation at the moment, and dap-mode only works with lsp-mode currently.

The next best possibility that I currently see, but haven't had time to try, is to use the gdb-mi interface that samsung provides in netcoredbg and tie that to existing gdb-mi or realgud (https://github.com/realgud/realgud/wiki/How-to-add-a-new-debugger#check-lang) in emacs. If you have time and energy, I personally think this might be the fastest route to having working debugging for csharp in emacs.

@sebasmonia
Copy link

Thanks for the detailed reply. I have seen the Samsung one but didn't realize it was a valid option, thought it was a small project that preceded vsdbg.

I learned some cdb & SOS recently and created an issue in readgud to add cdb support thinking of C# debugging.
Now that I have a clearer picture I should repurpose that open issue to C# using netcoredbg.
But first...learn to use netcoredbg :)

Again, appreciate the detailed response, it set me on a path that hopefully will lead...somewhere.

@sebasmonia
Copy link

sebasmonia commented May 8, 2019

I was able to build netcoredbg and attach to a process but all the docs I've found on gdb give commands that don't work at all.
So I'm in the right path but need an extra nudge :)

Update: using the repo unit tests to find out which commands work, but if you have any docs they might still be useful.

@Daniel-V1
Copy link

Unfortunately I do not. I wound up in the same place as you lol, just checking their unit tests.

@zoechi
Copy link

zoechi commented Jan 4, 2020

What about https://github.com/dotnet/diagnostics/blob/master/documentation/sos-debugging-extension.md?
Could this work with Emacs for example with dap or gud?
(I'm quite new to Emacs)

@nosami
Copy link
Contributor

nosami commented Jul 1, 2020

I just got dap-mode working with C# and F# coreclr apps - emacs-lsp/dap-mode#138 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants