- PixieDebugger is a powerful visual debugger for Python that works in Jupyter Notebooks
- It comes with multiple features, including a source editor and a code execution controlling toolbar
- It works as a magic command and requires PixieDust as a prerequisite
Picture this – you think you’ve designed a phenomenal model using tons of lines of code but there’s a pesky error in there. It’s holding back the model from achieving it’s full power but you can’t quite figure out what’s wrong. Sure, you could use Jupyter’s pdb but wouldn’t it be awesome to visually debug that code block within an interactive environment? I’ve got some awesome news for you!
PixieDebugger, developed by the PixieDust team, claims to be the first visual debugger for Python that works exclusively with Jupyter Notebooks. Note that it doesn’t yet work with JupyterLab but the developers might be working on fixing this soon. The PixieDebugger comes packaged with multiple features, including:
- A source editor
- Console output feature
- Local variable inspector
- Breakpoint management
- Code execution controlling toolbar
Keep in mind that you need to install PixieDust as a prerequisite before using this debugger. To do so, simply go to command prompt/terminal, and paste the following:
pip install pixiedust
Before you start using it, you’ll need to import it first:
Now you’re ready! Invoke this awesome tool as a magic command using the simple below code:
And voila! Now try this out on any code block you have open in your Jupyter notebook and you’ll start to see the magic.
Check out the below video which shows how PixieDebugger works in a Jupyter Notebook environment:
Our take on this
I’ve been using Jupyter Notebooks more and more lately (I’m started using Python recently after switching over from R), so this feels like the icing on the cake. Having tried PixieDebugger out extensively, I can vouch for how easy and helpful it make my coding experience. I encourage all data scientists to try it out as well, it’s sure to become a very handy tool for you.
In case you are a beginner with Python and/or Jupyter Notebooks, go through this article which comprehensively covers all aspects of this wonderful IDE and why you should use it next time you start working on a new project or dataset.
Subscribe to AVBytes here to get regular data science, machine learning and AI updates in your inbox!
You can also read this article on our Mobile APP