r/csharp • • 1d ago

Solved Debugging on linux

I've got weak laptop that i use from time to time for c# classes. On vs code it says i cannot debug. Is there any way to do so?

2 Upvotes

15 comments sorted by

4

u/rupertavery64 1d ago

-5

u/Puzzleheaded_Ant5192 1d ago

But...

4

u/rupertavery64 1d ago

What version are you using?

Cursor? VsCodium? Did you install the official Microsoft VSCode?

-8

u/Puzzleheaded_Ant5192 1d ago

Vs codium. Is that the problem?

12

u/rupertavery64 1d ago

Yes. The official debugger is only supported on offical vscode. Licensing and stuff.

Try looking for Samsungs netcoredbg

Or install the official

3

u/Puzzleheaded_Ant5192 1d ago

Alright, thanks!

2

u/chic_luke 1d ago

Unfortunately, yes. Microsoft wants to steward .NET as an open source friendly stack but they are utterly failing at the basics.

Which I hate. I love this development ecosystem, but most of my friends into Linux and free software auto-write it off and they don't take it seriously. And I don't know how to blame them

13

u/svick nameof(nameof) 1d ago

What about the message is unclear?

4

u/Fresh_Acanthaceae_94 1d ago

https://github.com/lextudio/sharpdbg/blob/main/COMPARISON.md You need to configure one of the debuggers that can work with VS Code or its forks.

2

u/dodexahedron 22h ago

Install the real vscode or jetbrains rider to use debugging.

vscodium is to vscode as chromium is to chrome, and does not support everything, partially (mostly) for licensing reasons.

There is no legitimate technical reason to stick to vscodium over vscode, if you aren't trying to package vscode itself in binary form with something that has an incompatible license. Which you arent and likely never will your entire life.

1

u/Fresh_Acanthaceae_94 3h ago

You cannot use vsdbg or Rider without another set of licensing issues as neither of them is free and open source.

The recent advancement of multiple .NET debugger projects renders no need to resort to those closed source debuggers.

-10

u/Rigamortus2005 1d ago

Console.writeline

5

u/chic_luke 1d ago

TERRIBLE idea. It could mess a lot of things up in some contexts, and it's really unreliable for benchmarking or debugging async code

Look up what writing to stdout does to performance in an Operating Systems course

4

u/dodexahedron 23h ago

Absolutely, and in general.

Specifically for OP, in a class, just needing to inspect something, it's fine to output to the console in a pinch.

But yeah they need to just install real vscode or rider and debug using the debugger.