Currently I am trying to debug a Linux .NET Core application under Linux.
The trouble is, it fails somewhere right in the beginning, and I cannot get where. Logging is impossible under current circumstances.
As far as I can see on the Internet, and (severely avoiding any kind of systematizedness and consequtiveness) on MSDN specifically, the only currently available options for Linux are:
- debug remotely (would not do well in my case);
- Rider EAP by Jetbrains (proprietary decision);
- using lldb.
So, my questions are:
- Is there any way to launch the .NET Core self-contained app (via the "dotnet Some.dll" command) in such a way that it instantly breaks (i.e. as if there was a breakpoint) at the entry point?
- If not, how can one launch lldb for a .NET Core console application attached (since numerous examples and issues over the Internet all show attaching to the already-running .NET Core process)?
- Once again, there is the dotnet-dump utility, which works with already-running processes as well - so that, even dumps are an unavailable ooption for processes that crash almost instantly. I expected there might have been ways to make it dump like (imaginary) "dotnet-dump collect SomeInvocation.dll" along with (actully existing) "dotnet-dump collect --process-id 1234". Is there such a way?