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

[IDEA] c# debugging #96

Closed
Uroc327 opened this issue Aug 9, 2013 · 16 comments
Closed

[IDEA] c# debugging #96

Uroc327 opened this issue Aug 9, 2013 · 16 comments

Comments

@Uroc327
Copy link

Uroc327 commented Aug 9, 2013

I pretty much like the way one can debug in Visual Studio...

Is it possible with mono under linux/Max OSX or the c# stuff under windows to get some of these awesome debugging features into vim?

@nosami
Copy link
Contributor

nosami commented Aug 9, 2013

It probably is possible, but very complex and I don't really have any interest personally in building this as I very rarely use a debugger.

@mikavilpas
Copy link
Contributor

I've been toying with this idea also. There are a lot of debuggers
that are easily integrated into text editors. For Emacs, there are
many working command line / text UI integrations available for other
languages. So this would definately be doable.

I haven't been able to find any command line debugger for C#, but
there are very working implementations of debuggers in IDEs other than
Visual studio already, such as MonoDevelop or SharpDevelop.

Maybe one of these implementations could be plugged into the OmniSharp
server. That would have a JSON API that would let the user manipulate
the debugger's state.

@Uroc327
Copy link
Author

Uroc327 commented Aug 11, 2013

Apparently there is a command line debugger officially in the mono project (Mono Hard Debugger).
Also it is possible to debug mono with gdb (cli too) (Debugging with GDB).

As there are plugins to use gdb functions directly in Vim, I think this should be possible with mdb/gdb for mono too.

After a quick search for vim gdb plugins I got the following (just as reference, if someone would decide, to implement debugging ;) ):
The Clewn Project
gdbmgr
gdbvim
idevim.tgz
VimDebug

@mikavilpas
Copy link
Contributor

I looked around and found there are ready libraries for plugging in a debugger.
This looks like it's very doable.

https://github.com/mono/debugger-libs

@mikavilpas
Copy link
Contributor

@nosami
Can this ticket be moved to a OmnisharpServer ticket?

edit: perhaps a separate ticket should be opened. What do you think?

@johnhidey
Copy link

With .NET Core 1.0 released I have begun to make the move away from Windows. While I am new to the other ecosystems out there I must say that I am really enjoying my development in vim without all the overhead of VS. I too would love to see debugging support brought to omnisharp-vim. At least the .net core 1.0 projects.

@lucasteles
Copy link

If MS changes the license of the vsdbg, maybe it can be integrated, for now the can be used only with VS Code, Visual Studio and Xamarin studio

dotnet/core#505

@jpfeiffer16
Copy link
Contributor

jpfeiffer16 commented May 19, 2019

In case anyone here is still interested in debugging C# from vim, I also was interested in this and due to the licencing on Microsoft's vsdbg as mentioned above, I stumbled accross an OSS debugger built by Samsung: https://github.com/Samsung/netcoredbg.
I used this to create a service that talks to the debugger and forwards relevant info to vim (highlight the line for the current stack frame etc..). It's still very buggy, but it works and I'm trying to re-write the js prototype in c#.
The portion that wraps the Samsung debugger is here: https://github.com/jpfeiffer16/dotdbg
The vim client is here: https://github.com/jpfeiffer16/dotdbg-vim

outhaCEkb3DTh

@nickspoons
Copy link
Member

Definitely interested - please keep us posted on your progress!

@jpfeiffer16
Copy link
Contributor

Just an update for anybody interested. With the new stdio stuff, my code for this is not really relevant anymore. Before restarting based on the awesome new stdio stuff, I'm going to look into adding support in https://github.com/puremourning/vimspector. They note the ms licensing stuff, but I'm wondering if I can shim in the samsung debugger and get something useful.

@nickspoons
Copy link
Member

@jpfeiffer16 I spoke to puremourning in #vim on freenode (IRC) about this a while back, before the samsung debugger came out, and yes he was not interested at the time at working against the MS license. If you can get something working with the samsung one I'd love to be a guinea pig.

@jpfeiffer16
Copy link
Contributor

After messing around with vimpsector for a bit and some help from puremourning, I got it working and it's great! There are some rough edges I've bumped into from time to time with large variables, but for the most part I'm blown away with how well it works!

https://asciinema.org/a/vfBOwVatfTTPi5vIsq11iPi6s

@jpfeiffer16
Copy link
Contributor

PR here if you're interested @nickspoons : puremourning/vimspector#36

@nickspoons
Copy link
Member

Magic, I can't wait to try it!

@jpfeiffer16
Copy link
Contributor

Yea. It's a gem of a plugin. So glad I came across it.

@nickspoons
Copy link
Member

Debugging dotnet core in vimspector works great.

There have been a lot of changes to the landscape since this issue was opened, we now have LSP and DAP for language servers and debug adapters. As OmniSharp-vim is closely tied to the OmniSharp-roslyn language server, I don't think it makes sense to include debugging support here, now or in the future, so I'll close this very old issue now.

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

No branches or pull requests

7 participants