Skip to content

kreneskyp/fastdebug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastDebug

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.

Why in the heck would you build this?

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!

Usage

image

  1. Start the server

    poetry run server
    
  2. Init the session

    Init the debugging with a POST to /debug/init The payload should be a classpath, where the last element is the entry function. For example, to start start() in foo.py send this payload

    {classpath: "foo.start"}
    
  3. Start the script

    Start the debugging run with a POST to /debug/start

  4. List variables from paused frame

    Fetch variables from the current frame with a GET to /debug/vars

  5. Step to the next line

    Step to the next line with a POST to /debug/step

About

A FastAPI based python debugger

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages