debug_launchLABSCO SUMMARY
The exception autopsy is the tool that changes how an agent debugs.
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.
What it is
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.
What you get
- 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}
Requirements
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.
Setup effort
One command — dnx -y debug-mcp
USE CASES
Finding why a method returns null
Launch the app, break at the line, wait for the hit, and read the locals in that frame.
Catching an exception you cannot reproduce by reading code
Break on the exception type, run the flow, and pull the full context including inner exceptions and locals.
Watching a hot path without stopping it
Set a tracepoint that logs the values and leaves execution running.
Understanding a memory problem
Inspect the object, read its layout, and find what still holds a reference to it.
Navigating code before you even run it
Load the project and find usages, assignments and diagnostics with no debug session attached.
Attaching to something already running
Attach to the process, list the threads, and take a stack trace where it is now.
36 tools
Listed in project docs. Your client may show a different list.
debug_attachdebug_disconnectdebug_statedebug_continuedebug_pausedebug_stepbreakpoint_setbreakpoint_removebreakpoint_listbreakpoint_enablebreakpoint_waitbreakpoint_set_exceptiontracepoint_setexception_get_contextthreads_liststacktrace_getvariables_getevaluateobject_inspectmemory_readlayout_getreferences_getmembers_getmodules_listmodules_searchtypes_getcode_loadcode_goto_definitioncode_find_usagescode_find_assignmentscode_get_diagnosticsprocess_write_inputprocess_read_outputresharper_inspect_solutionresharper_inspect_projectBEFORE YOU INSTALL
What to know first
Tools you get
36 tools named in the project's documentation.
Requires
- dnx on PATH
- .NET 10
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
dnx -y debug-mcpMCP Clients
Claude Desktop, Claude Code
{
"mcpServers": {
"dotnet-debugger": {
"command": "dnx",
"args": [
"-y",
"debug-mcp"
]
}
}
}