How to Debug a Python app in Docker using NerdVision

David Thacker

April 24, 2021

Getting started with NerdVision


So you have seen NerdVision but maybe you are new to coding or don't have an app available that you can test NerdVision out with. 


In this article we will give you a complete environment, running a basic Python calculator so you can start Debugging in under 5 minutes with NerdVision; this will work for any environment on Windows, Mac and Linux. 


  1. To get started download docker, for this article we will use Docker Desktop: https://www.docker.com/get-started
  2. Install docker Desktop
  3. Sign Up for NerdVision and create an account.: https://www.nerd.vision/signup
  4. Now you need to connect your application: https://app.nerd.vision/setup; please select Python, as this is a Python app we will be running.
  1. Please copy your API key, and put this somewhere safe.
  1. Open up your terminal or command prompt and run the following command;docker run -d -p 9998:9998 -e NV_API_KEY=yourapikey nerdvision/nerdulator:python
  2. Replace: yourapikey with the API key you just copied
  3. Hit enter and your docker container will build and start running itself. 
  4. This will be displayed to you on Docker Desktop, the image will indicate it is running by being green; this is the container called vigorous_bohr
  1. This container is running on port 9998
  2. To access the Nerdulator you need to hit the following URL: http://localhost:9998/add?int1=5&int2=7&int3=6
  3. You should now see the following response:
  1. Well done, your application is now running on Docker. Now we need to go back to NerdVision so you can see how NerdVision works! : https://app.nerd.vision/


  1. Now we need to add the source code so NerdVision can see what lines it needs to add the trace points on. In Gitlab; click clone, and choose : “Clone with HTTPS” the URL you will get is : https://gitlab.com/nerd-vision/nerdulator/python.git copy this and add it to your clipboard we will need to pase it in a moment.  
  2. Click on the bug icon to enter the NerdVision Debugger.


  1. We now need to add the Nerdulator repository, go to the top right of the NerdVision app and click the plus button.
  1. Once here add the repository URL: we copied “https://gitlab.com/nerd-vision/nerdulator/python.git
  2. Now hit “Create Repository”
  1. Congratulations you are now fully setup with NerdVision!
  2. With the Nerdulator you can run the following commands by swapping add for : divide, multiply, subtract in the URL: http://localhost:8080/add?int1=5&int2=7
  3. Changing the numbers allows you to  get different outputs in the calculator. 
  4. To set a tracepoint please go back to NerdVision debugger: https://app.nerd.vision/ and the set a tracepoint. 
  5. To get you started I suggest you put a trace point on lines. 20, 34, 48 and 62 this is the line self.write({ you will be able to see the variables that appear in the application at that time depending on the function you using; add, divide, multiply, subtract






David Thacker

David Thacker

David Thacker is the Business Unit Owner for NerdVision and is focused on how NerdVision can make a developers' life better! Feel free to get in contact with me via twitter @dwthacker