|
2 | 2 |
|
3 | 3 | > 🏠 **[← Back to Main README](../README.md)** | 📚 **Other Docs:** [🔧 Configuration](CONFIGURATION.md) | [🤖 Integration](INTEGRATION.md) | [👨💻 Development](DEVELOPMENT.md) |
4 | 4 |
|
5 | | -## Debugging Tools (8 tools) |
| 5 | +## Debugging Tools (10 tools) |
6 | 6 |
|
7 | 7 | Windows debugging capabilities through WinDBG/CDB integration: |
8 | 8 |
|
9 | 9 | ### Core Debugging Commands |
10 | 10 | - **Crash Dump Analysis**: `nexus_open_dump_analyze_session`, `nexus_close_dump_analyze_session` |
| 11 | +- **Session Management**: `nexus_list_dump_analyze_sessions`, `nexus_list_dump_analyze_session_async_commands` |
11 | 12 | - **Remote Debugging**: `nexus_start_remote_debug`, `nexus_stop_remote_debug` |
12 | 13 | - **Command Execution**: `nexus_dump_analyze_session_async_command` (🔄 ASYNC QUEUE: Always returns commandId, use `nexus_dump_analyze_session_async_command_status` for results) |
13 | 14 | - **Queue Management**: `nexus_dump_analyze_session_async_command_status`, `nexus_debugger_command_cancel`, `nexus_list_debugger_commands` |
14 | 15 |
|
15 | | -### 🔄 Async Command Execution Workflow |
| 16 | +### 🔄 Complete Debugging Workflow |
16 | 17 |
|
17 | 18 | **IMPORTANT**: All WinDBG commands use an async queue system with real-time notifications: |
18 | 19 |
|
19 | 20 | ```bash |
20 | | -1. Call nexus_dump_analyze_session_async_command {"command": "!analyze -v"} |
21 | | - → Returns: {"commandId": "abc-123", "status": "queued", ...} |
| 21 | +1. nexus_open_dump_analyze_session {"dumpPath": "C:\\crash.dmp"} |
| 22 | + → Returns: {"sessionId": "sess-000001-abc12345-12345678-0001", ...} |
22 | 23 |
|
23 | | -2. Listen for real-time notifications: |
| 24 | +2. nexus_dump_analyze_session_async_command {"sessionId": "sess-000001-abc12345-12345678-0001", "command": "!analyze -v"} |
| 25 | + → Returns: {"commandId": "cmd-000001-abc12345-12345678-0001", "status": "queued", ...} |
| 26 | + |
| 27 | +3. Listen for real-time notifications: |
24 | 28 | → notifications/commandStatus: {"status": "executing", "progress": 25, ...} |
25 | 29 | → notifications/commandHeartbeat: {"elapsed": "30s", ...} (for long commands) |
26 | 30 | → notifications/commandStatus: {"status": "completed", "result": "ACTUAL_OUTPUT"} |
27 | 31 |
|
28 | | -3. OR poll nexus_dump_analyze_session_async_command_status {"commandId": "abc-123"} |
| 32 | +4. OR poll nexus_dump_analyze_session_async_command_status {"commandId": "cmd-000001-abc12345-12345678-0001"} |
29 | 33 | → Returns: {"status": "executing", ...} (keep polling) |
30 | 34 | → Returns: {"status": "completed", "result": "ACTUAL_OUTPUT"} |
31 | 35 |
|
32 | | -4. Extract the "result" field for your WinDBG command output |
| 36 | +5. nexus_list_dump_analyze_sessions {} (optional) |
| 37 | + → Returns: {"sessions": [...]} - List all active sessions |
| 38 | + |
| 39 | +6. nexus_list_dump_analyze_session_async_commands {"sessionId": "sess-000001-abc12345-12345678-0001"} (optional) |
| 40 | + → Returns: {"commands": [...]} - List all commands for this session |
| 41 | + |
| 42 | +7. nexus_close_dump_analyze_session {"sessionId": "sess-000001-abc12345-12345678-0001"} |
| 43 | + → Returns: {"success": true, ...} - Clean up resources |
33 | 44 | ``` |
34 | 45 |
|
35 | 46 | **⚠️ CRITICAL**: `nexus_dump_analyze_session_async_command` NEVER returns command results directly. You MUST use `nexus_dump_analyze_session_async_command_status` to get results or listen for notifications! |
36 | 47 |
|
| 48 | +### 📋 Session Management Commands |
| 49 | + |
| 50 | +#### `nexus_list_dump_analyze_sessions` |
| 51 | +Lists all active debugging sessions with detailed information. |
| 52 | + |
| 53 | +**Parameters:** None |
| 54 | + |
| 55 | +**Returns:** |
| 56 | +```json |
| 57 | +{ |
| 58 | + "success": true, |
| 59 | + "operation": "nexus_list_dump_analyze_sessions", |
| 60 | + "message": "Found 2 active sessions", |
| 61 | + "sessions": [ |
| 62 | + { |
| 63 | + "sessionId": "sess-000001-abc12345-12345678-0001", |
| 64 | + "dumpFile": "crash.dmp", |
| 65 | + "status": "Active", |
| 66 | + "createdAt": "2024-09-26 23:15:30 UTC", |
| 67 | + "lastActivity": "2024-09-26 23:20:15 UTC", |
| 68 | + "commandsProcessed": 5, |
| 69 | + "activeCommands": 2 |
| 70 | + } |
| 71 | + ] |
| 72 | +} |
| 73 | +``` |
| 74 | + |
| 75 | +#### `nexus_list_dump_analyze_session_async_commands` |
| 76 | +Lists all async commands for a specific session. |
| 77 | + |
| 78 | +**Parameters:** |
| 79 | +- `sessionId` (required): The exact sessionId from `nexus_open_dump_analyze_session` |
| 80 | + |
| 81 | +**Returns:** |
| 82 | +```json |
| 83 | +{ |
| 84 | + "success": true, |
| 85 | + "operation": "nexus_list_dump_analyze_session_async_commands", |
| 86 | + "message": "Command listing for session: sess-000001-abc12345-12345678-0001", |
| 87 | + "commands": [ |
| 88 | + { |
| 89 | + "commandId": "cmd-000001-abc12345-12345678-0001", |
| 90 | + "command": "!analyze -v", |
| 91 | + "status": "completed", |
| 92 | + "queuedAt": "2024-09-26 23:15:30 UTC", |
| 93 | + "completedAt": "2024-09-26 23:15:45 UTC" |
| 94 | + } |
| 95 | + ] |
| 96 | +} |
| 97 | +``` |
| 98 | + |
37 | 99 | ## 📡 Real-Time Notifications |
38 | 100 |
|
39 | 101 | The server sends live notifications about command progress: |
|
0 commit comments