This guide explains how to use the dx command with VibeDbg for rich visualization of debugger object model expressions.
The dx command displays C++ expressions using the NatVis extension model, providing rich visualization of objects, data structures, and debugger objects. VibeDbg includes enhanced support for this command through both direct execution and a specialized MCP tool.
You can use the dx command directly through the execute_command tool:
Execute the dx command to show debugger settings
This will execute: dx Debugger.Settings
For more complex scenarios, use the dedicated dx_visualization tool:
Use the dx visualization tool to display the current process environment with 3 levels of recursion
The dx command supports various options that can be specified through the MCP tool:
Display data in tabular format with sorting capabilities:
Show debugger sessions in grid view
Specify how many levels deep to display nested objects:
Display process environment with 2 levels of recursion
Include methods and additional object information:
Show debugger sessions in verbose mode
Use native C/C++ structures only, bypassing NatVis:
Display idle process using native structures only
Customize output format:
x- Hexadecimald- Decimalo- Octalb- Binaryen- Enum names onlys- ASCII stringssu- Unicode strings
Display debugger sessions in hexadecimal format
dx Debugger.Settings
Shows debugger configuration and settings.
dx Debugger.Sessions
Lists all debugging sessions.
dx Debugger.State
Shows current debugger state.
dx @$curprocess
Shows information about the current process.
dx @$curprocess.Environment
Shows the current process environment block.
dx @$curthread
Shows information about the current thread.
dx nt!PsIdleProcess
Shows the idle process object (kernel mode only).
dx nt!PsInitialSystemProcess
Shows the initial system process (kernel mode only).
dx -g -r3 Debugger.Sessions
Shows debugger sessions in grid view with 3 levels of recursion.
dx -v @$curprocess.Io.Handles
Shows process handles with verbose information.
dx -n nt!PsIdleProcess
Shows idle process using native structures only.
The dx command may fail in certain scenarios:
- Invalid Expression: The expression doesn't exist or can't be evaluated
- Memory Access: The target memory can't be accessed
- Symbol Issues: Required symbols are not loaded
- Mode Restrictions: Some objects are only available in specific debugging modes
VibeDbg provides detailed error messages and suggestions for resolving these issues.
- Start Simple: Begin with basic expressions before adding complex options
- Use Recursion Carefully: High recursion levels can produce large outputs
- Combine with Other Commands: Use
dxwith other debugging commands for comprehensive analysis - Check Mode: Ensure you're in the correct debugging mode (user/kernel) for the objects you want to examine
The dx command works seamlessly with other VibeDbg tools:
Set a breakpoint at main, continue execution, then use dx to show the current process environment
This demonstrates how dx can be combined with breakpoint management and execution control for comprehensive debugging workflows.
- "No type information": Load symbols for the target module
- "Unable to read memory": Check if the target process is accessible
- "Expression not found": Verify the expression syntax and availability
- Use
lmto check loaded modules - Use
xto search for symbols - Use
!processto verify process information - Try with
-nflag for native structure display