By: Arif Khan
In programming, debugging is very necessary to find bug generating lines of code. Almost every IDE is equipped with its debugger. But I saw many Jupyter Notebook users who are not able to debug their code in with in Jupyter Notebook environment. In this Blog you will learn how to debug your Jupyter Notebook cell.
Let’s Start Debugging.
Step 1. Open Jupyter Notebook and create or open your notebook.
Step 2. In the top most cell just type as following command and execute the cell. if you receive module not found error then first install this library by typing pip command “pip install pixiedust”.
Step 3. To debug a cell you need to decorate the code as you can see in below image. When execute the decorated cell it will take you into debug mode. I think there is no need to describe debug mode as it is already self-explanatory.
Adding Breakpoint:
You can also put breakpoint as any line of code as per your requirement by mouse click at the beginning of code line.
If your code is too large and you have to put breakpoint at some line, you can do this by telling pixie to find the by itself and put breakpoint on it as below image.
Hope you will understand the debugging process with pixiedust.
Hearing from you, will be my pleasure, If you have any comments or questions, please post below.
Happy debugging.