Instead of a stack trace and a guess, exception_get_context returns the exception, its inner exceptions, the frames with source, and the locals at each one — enough for the agent to name the line that was wrong. Talking to ICorDebug directly, rather than through an external debugger, is what makes evaluating expressions and reading object layout possible at all.
A .NET debugging server that talks to the runtime directly through ICorDebug rather than driving an external debugger over DAP. It launches or attaches to a process, controls execution, and reads program state back as structured results.
- debug_launch, debug_attach, debug_disconnect, debug_state — start, attach to, and end a debug session
- debug_continue, debug_pause, debug_step — control program flow
- breakpoint_set, breakpoint_remove, breakpoint_list, breakpoint_enable, breakpoint_wait — source breakpoints, and a wait that blocks until one is hit
- breakpoint_set_exception — break on a specific exception type, first or second chance
- tracepoint_set — log a message at a location without pausing execution
- exception_get_context — the exception autopsy: type, message, inner exceptions, stack frames with source, and local variables in one call
- threads_list, stacktrace_get, variables_get, evaluate — examine state at a pause
- object_inspect, memory_read, layout_get, references_get — object layout, raw memory, and what still references an object
- modules_list, modules_search, types_get, members_get — browse loaded assemblies, types and members
- code_load, code_goto_definition, code_find_usages, code_find_assignments, code_get_diagnostics — Roslyn analysis that works with no session running
- process_write_input and process_read_output — talk to the debugged process's stdin and stdout
- Subscribable resources: debugger://session, debugger://breakpoints, debugger://threads and debugger://source/{file}
The .NET 10 SDK or later, on Linux — Windows and macOS support is planned. No install step: clients launch it with dnx. Some tools need a session in a particular state — the code analysis tools run without one, breakpoint and module tools need an active session, and anything reading variables or memory needs the process paused.
One command — dnx -y debug-mcp
