11

Just for fun, how close can we get to debug an application in C# using only the command-line out-of-the-box? No other software, just the command-line. That is, for instance, is there a way to peek at the values of variables, interact with output, etc. like the VS debugger does?

EDIT: And just for completeness' sake, here is the mono equivalent: http://mono-project.com/Guide:Debugger, although it doesn't seem to be very stable.

Thanks.

2
  • You means, something like gdb for managed code? Commented Nov 1, 2009 at 11:01
  • @Martinho. Yes, something like that. Look at driis' answer, and a screenshot here: insidepro.com/kk/258/258_11.jpg, that's quite awesome. Commented Nov 1, 2009 at 11:03

2 Answers 2

7

You can use the CLR debugger, which is part of the framework installation; and does not depend on VS.

An alternative (and more appropiate for your question) is MDbg, which is a command line debugger for managed code.

Sign up to request clarification or add additional context in comments.

2 Comments

Very interesting! Probably MDbg is what I'm looking for... I'll give it a shot.
MDbg may have been a valuable option back in 2009 but it is definitely outdated now. @driis (if you are still there) are there any viable alternatives to MDbg in 2022 for C# code running on .NET 6?
1

There are command line debuggers that come with Debugging Tools for Windows like CDB . For managed applications you will also need the SOS module.

1 Comment

Thanks, Darin. I'm only after what can be done with the tools that come with VS, no additional downloads.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.