How codedriverepeat/netcoredbg works
NetCoreDbg is a .NET Core debugger that exposes both GDB/MI and VS Code’s Debug Adapter Protocol, as well as a command-line interface. The principal workflow starts with a user or IDE selecting a protocol; the executable dispatches to that interface, which mediates debugging operations such as breakpoints, stepping, evaluation, and variable inspection. The tree supports these domain areas, but most implementation files were not excerpted, so links among them are left unverified. The graph omits build and test infrastructure.
Main entry points: manageddebugger.cpp Managed debugger · main.cpp Executable dispatch · vscodeprotocol.cpp VS Code protocol · cliprotocol.cpp Command-line protocol
Components 20
Executable entry
- Executable dispatch
src/main.cpp
Debugger interfaces
- Command-line protocol
src/protocols/cliprotocol.cpp - GDB/MI protocol
src/protocols/miprotocol.cpp - VS Code protocol
src/protocols/vscodeprotocol.cpp - Debugger interfaces
src/interfaces/idebugger.h
Debug operations
- Managed debugger
src/debugger/manageddebugger.cpp - Breakpoint handling
src/debugger/breakpoints.cpp - Stepping
src/debugger/steppers.cpp - Expression evaluation
src/managed/Evaluation.cs - Frames and variables
src/debugger/variables.cpp - Thread control
src/debugger/threads.cpp
Runtime support
- Modules and symbols
src/metadata/modules.cpp - Native interop
src/debugger/interop_debugging.cpp - Managed bridge
src/managed/interop.cpp - CoreCLR definitions
src/coreclr/cor.h
Shared utilities
- Source storage
src/protocols/sourcestorage.cpp - String utilities
src/utils/string_view.h - Resource lifetime
src/utils/torelease.h
Other components
- Debugger user
- VS Code / GDB client
Connections 22
- Debugger user → Executable dispatch: starts
README.md - VS Code / GDB client → Executable dispatch: selects protocol
README.md - Executable dispatch → Command-line protocol: dispatches to
src/main.cpp - Executable dispatch → GDB/MI protocol: dispatches to
src/main.cpp - Executable dispatch → VS Code protocol: dispatches to
src/main.cpp - Executable dispatch → Managed debugger: uses
src/main.cpp - Executable dispatch → Managed bridge: uses
src/main.cpp - Command-line protocol → Debugger interfaces: uses interface
- GDB/MI protocol → Debugger interfaces: uses interface
- VS Code protocol → Debugger interfaces: uses interface
- GDB/MI protocol → Managed debugger: routes commands
- VS Code protocol → Managed debugger: routes requests
- Command-line protocol → Managed debugger: routes commands
- Managed debugger → Breakpoint handling: manages
- Managed debugger → Stepping: coordinates
- Managed debugger → Expression evaluation: delegates evaluation
- Managed debugger → Frames and variables: serves inspection
- Managed debugger → Thread control: controls
- Managed debugger → Modules and symbols: uses metadata
- Managed debugger → Native interop: supports interop
- Managed bridge → CoreCLR definitions: bridges runtime
- VS Code protocol → Source storage: uses source storage