A FastAPI based python debugger
This is a very basic debugger that runs inside of a FastAPI server.
NOTE: This server is only semi-functional. It currently pauses on every line whether there is a break point or not. It also doesn't handle exceptions in the target script very well.
It's a proof of concept for a debugger that an LLM could use to debug a python script. LLMs can use OpenAPI compliant APIs easily via LangChain OpenAPI function chains!
-
Start the server
poetry run server -
Init the session
Init the debugging with a
POSTto/debug/initThe payload should be a classpath, where the last element is the entry function. For example, to startstart()infoo.pysend this payload{classpath: "foo.start"} -
Start the script
Start the debugging run with a
POSTto/debug/start -
List variables from paused frame
Fetch variables from the current frame with a
GETto/debug/vars -
Step to the next line
Step to the next line with a
POSTto/debug/step