What is the simplest way to run a C# program in linux (eg with `dotnet`) and be able to see the output of Debug.Print statements? All the instructions I find on Google only show how to do this in VS Code and I am not currently using VS Code.
@mcc non-committal answer: I think you can `dotnet build path/to/dir/containing/the/sln/file` the thing and just run it? Fuck, I don't know what sort of control the output log levels or whatever.
@onelson Debug.Print isn't a "log level". It sends information to an attached debugger, and if no debugger is attached it is a noop

@mcc @onelson not quite a noop, it goes to syslog
https://github.com/dotnet/runtime/blob/b1968e7aa8d56a088e8be6817d5240fb345f901c/src/libraries/System.Private.CoreLib/src/System/Diagnostics/DebugProvider.Unix.cs#L48

e.g.
`Debug.WriteLine("this is some output " + DateTime.Now.ToString(), "foo");`

`$ tail -F /var/log/syslog`
...
`Aug 14 14:38:29 sandsys dotnet_hell: foo: this is some output 2024-08-14 2:38:29 p.m.`

runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/DebugProvider.Unix.cs at b1968e7aa8d56a088e8be6817d5240fb345f901c · dotnet/runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps. - dotnet/runtime

GitHub
@mcc @onelson (with just a regular `dotnet run` of a `dotnet new console` project with nothing else special)
@rakslice @onelson D: this might actually be worse than doing nothing
@mcc @onelson absolutely, but it 100% fits with the Microsoft mentality about this sort of stuff
@rakslice @mcc you can send the logs to dmesg by editing a key in the linux registry

@onelson @mcc "editing a key in the linux registry" alol.

but to be serious, it's syslog output so a variety of syslog implementations are available and most of those you can configure to deliver different categories of output a variety of different ways to different targets (e.g. different files, devices, etc.) or not