dbg-cli 0.3.3

A universal debugger CLI that lets AI agents observe runtime state instead of guessing from source code
Documentation
{"version": 2, "width": 96, "height": 32, "timestamp": 1744300800, "title": "dbg: agent debugging in 30 seconds", "env": {"TERM": "xterm-256color", "SHELL": "/bin/bash"}}
[0.0, "o", "\u001b[1;35m>\u001b[0m "]
[0.6, "o", "T"]
[0.65, "o", "h"]
[0.7, "o", "e"]
[0.73, "o", " "]
[0.78, "o", "f"]
[0.82, "o", "u"]
[0.85, "o", "n"]
[0.88, "o", "c"]
[0.91, "o", "t"]
[0.94, "o", "i"]
[0.97, "o", "o"]
[1.0, "o", "n"]
[1.03, "o", " "]
[1.08, "o", "i"]
[1.11, "o", "n"]
[1.14, "o", " "]
[1.17, "o", "/"]
[1.2, "o", "t"]
[1.23, "o", "m"]
[1.26, "o", "p"]
[1.29, "o", "/"]
[1.32, "o", "c"]
[1.35, "o", "r"]
[1.38, "o", "a"]
[1.41, "o", "s"]
[1.44, "o", "h"]
[1.47, "o", "."]
[1.5, "o", "p"]
[1.53, "o", "y"]
[1.56, "o", " "]
[1.59, "o", "c"]
[1.62, "o", "r"]
[1.65, "o", "a"]
[1.68, "o", "s"]
[1.71, "o", "h"]
[1.74, "o", "e"]
[1.77, "o", "s"]
[1.8, "o", "."]
[1.83, "o", " "]
[1.86, "o", "D"]
[1.89, "o", "e"]
[1.92, "o", "b"]
[1.95, "o", "u"]
[1.98, "o", "g"]
[2.01, "o", " "]
[2.04, "o", "i"]
[2.07, "o", "t"]
[2.1, "o", "."]
[2.5, "o", "\r\n"]
[3.0, "o", "\r\n"]
[3.1, "o", "\u001b[2m  \u2570\u2500 \u001b[0m\u001b[2mRead /tmp/crash.py\u001b[0m\r\n"]
[3.4, "o", "\r\n"]
[3.5, "o", "  The file accesses \u001b[1mx[5]\u001b[0m on a list. Let me start a debug session to inspect\r\n"]
[3.6, "o", "  the runtime state and find the exact failure.\r\n"]
[4.0, "o", "\r\n"]
[4.1, "o", "\u001b[2m  \u2570\u2500 \u001b[0m\u001b[1;36mBash\u001b[0m \u001b[2mdbg start python /tmp/crash.py\u001b[0m\r\n"]
[4.4, "o", "\u001b[2m     \u001b[0mtarget: /tmp/crash.py\r\n"]
[4.8, "o", "\r\n"]
[4.9, "o", "\u001b[2m  \u2570\u2500 \u001b[0m\u001b[1;36mBash\u001b[0m \u001b[2mdbg break /tmp/crash.py:1\u001b[0m\r\n"]
[5.2, "o", "\u001b[2m     \u001b[0mBreakpoint 1 at /tmp/crash.py:1\r\n"]
[5.6, "o", "\r\n"]
[5.7, "o", "\u001b[2m  \u2570\u2500 \u001b[0m\u001b[1;36mBash\u001b[0m \u001b[2mdbg run\u001b[0m\r\n"]
[6.0, "o", "\u001b[2m     \u001b[0m> /tmp/crash.py(1)<module>()\r\n"]
[6.1, "o", "\u001b[2m     \u001b[0m-> x = [1,2,3]; print(x[5])\r\n"]
[6.5, "o", "\r\n"]
[6.6, "o", "  Hit the breakpoint. Let me step into the crash.\r\n"]
[7.0, "o", "\r\n"]
[7.1, "o", "\u001b[2m  \u2570\u2500 \u001b[0m\u001b[1;36mBash\u001b[0m \u001b[2mdbg step\u001b[0m\r\n"]
[7.4, "o", "\u001b[2m     \u001b[0m\u001b[1;31mIndexError: list index out of range\u001b[0m\r\n"]
[7.5, "o", "\u001b[2m     \u001b[0m> /tmp/crash.py(1)<module>()\r\n"]
[7.6, "o", "\u001b[2m     \u001b[0m-> x = [1,2,3]; print(x[5])\r\n"]
[8.0, "o", "\r\n"]
[8.1, "o", "  IndexError. Let me inspect the variable to confirm the root cause.\r\n"]
[8.5, "o", "\r\n"]
[8.6, "o", "\u001b[2m  \u2570\u2500 \u001b[0m\u001b[1;36mBash\u001b[0m \u001b[2mdbg \"print(x)\"\u001b[0m\r\n"]
[8.9, "o", "\u001b[2m     \u001b[0m[1, 2, 3]\r\n"]
[9.3, "o", "\r\n"]
[9.4, "o", "\u001b[2m  \u2570\u2500 \u001b[0m\u001b[1;36mBash\u001b[0m \u001b[2mdbg \"print(len(x))\"\u001b[0m\r\n"]
[9.7, "o", "\u001b[2m     \u001b[0m3\r\n"]
[10.1, "o", "\r\n"]
[10.2, "o", "  \u001b[1mRoot cause:\u001b[0m \u001b[33mx\u001b[0m has 3 elements (indices 0\u20132), but the code accesses \u001b[33mx[5]\u001b[0m.\r\n"]
[10.4, "o", "  Fix: change \u001b[33mx[5]\u001b[0m to a valid index, or add a bounds check.\r\n"]
[10.8, "o", "\r\n"]
[10.9, "o", "\u001b[2m  \u2570\u2500 \u001b[0m\u001b[1;36mBash\u001b[0m \u001b[2mdbg kill\u001b[0m\r\n"]
[11.2, "o", "\u001b[2m     \u001b[0mstopped\r\n"]
[11.6, "o", "\r\n"]
[11.7, "o", "\u001b[1;35m>\u001b[0m "]
[13.0, "o", ""]