bugjar logo

bugjar

A interactive graphical debugger for Python code. Part of the BeeWare suite.

View the Project on GitHub pybee/bugjar

bugjar

Part of the BeeWare logoBeeWare suite.

Anyone who learned to code in the mid to late 80s probably spent some time with a Borland compiler -- probably either Turbo Pascal or Turbo C. One of the best features of the Turbo compilers was their IDE -- and in particular, a really good visual debugger that would let you inspect code while it was running.

Then we all moved to Unix, and somehow forgot what a good debugger was. GDB is perfectly functional, but isn't very intuitive. GDB gives you perfect control over the execution of your code, but bad contextual information to let you know what control you should be exercising.

Then came Python. Python's execution model contains excellent debugging hooks, and supplies PDB as a proof of concept. PDB is an interface that shares many similarities with GDB -- text mode, fantastic control, but very bad contextual information.

So - enter bugjar. A graphical interface for debugging code. PDB, but with the context to help you step through code in a meaningful way.

Quickstart

In your Python project, install bugjar, and then use it to run your Python script:

$ pip install bugjar
$ bugjar myscript.py arg1 arg2

This will start up a GUI displaying code, breakpoints, and so on, ready to execute your code. You can then step through your code, set new breakpoints, remove existing breakpoints, and inspect anything that the debugger can give you access to: Screenshot of bugjar GUI.

It's PDB, but with helpful context.

Problems under Ubuntu

Ubuntu's packaging of Python omits the idlelib library from it's base packge. If you're using Python 2.7 on Ubuntu 13.04, you can install idlelib by running:

$ sudo apt-get install idle-python2.7

For other versions of Python and Ubuntu, you'll need to adjust this as appropriate.

Problems under Windows

If you're running Bugjar in a virtualenv under Windows, you'll need to set an environment variable so that Bugjar can find the TCL graphics library:

$ set TCL_LIBRARY=c:\Python27\tcl\tcl8.5

You'll need to adjust the exact path to reflect your local Python install. You may find it helpful to put this line in the ``activate.bat`` script for your virtual environment so that it is automatically set whenever the virtualenv is activated.

Documentation

Documentation for bugjar can be found on Read The Docs.

Community

Bugjar is part of the BeeWare suite. You can talk to the community through:

Contributing

If you experience problems with bugjar, you can log them on GitHub. If you want to contribute code, please fork the code and submit a pull request.