Hacker News new | ask | show | jobs
by generichuman 860 days ago
> If you're interested in writing C# and .Net code on a Linux machine. Then wait no further. VS Code (with .Net dev kit extension) works great.

Unless you're writing Roslyn source generators. You can only debug them with (non-code) Visual Studio on Windows in my experience. Rider does not work well either.

2 comments

You can probably attach to the compiler process with any debugger. Even just hitting F5 in VS didn't do the expected thing as it ended up debugging devenv.exe instead of VBCSCompiler.exe (the Roslyn analysis process). But if Rider (or VS Code) can attach to other processes, you should be able to debug your analyzers (and source generators).
My experience is that Rider works much much better (on Mac) for source generators than Visual Studio did on Windows. In particular it handles changes without reloading the solution far better than VS. I should probably add I have never used Rider on Windows, could be different there.