This documentation is now being maintained at dotnet-sos. This doc is no longer being updated.
SOS is a debugger extension that allows a developer to inspect the managed state of a .NET Core and desktop runtime process. SOS can be loaded by WinDbg/cdb debuggers on Windows and lldb on Linux and MacOS.
Getting a version of lldb depends on your platform and distro. Check the links below for more details:
The bpmd
command can now be used before the runtime is loaded. You can load SOS or the sos plugin on Linux and execute bpmd. Always add the module extension for the first parameter.
bpmd SymbolTestApp.dll SymbolTestApp.Program.Main
You can set a source file/line number breakpoint like this (the fully qualified source file path is usually not necessary):
bpmd SymbolTestApp.cs:24
Symbol server support - The setsymbolserver
command enables downloading the symbol files (portable PDBs) for managed assemblies during commands like clrstack
, etc. See soshelp setsymbolserver
for more details.
(lldb) setsymbolserver -ms
Before executing the "bt" command to dump native frames to load the native symbols (for live debugging only):
(lldb) loadsymbols
To add a local directory to search for symbols:
(lldb) setsymbolserver -directory /tmp/symbols