PyXLL The Python Excel Add-In
  • Product
    • Features
    • Get Started
    • Request Demo
    • Download
  • Pricing
  • Resources
    • Documentation
    • Blog
    • Videos
    • FAQ
    • Learn Python
    • Customer Portal
    • About Us
  • Support
    • Documentation
    • Videos
    • FAQ
    • Contact Us
  • Contact Us
Table of Contents
  • PyXLL Documentation
  • Introduction to PyXLL
  • User Guide
  • Video Guides and Tutorials
    • Installing the PyXLL Add-in
    • Writing Excel Functions in Python
    • Jupyter Notebooks in Excel
    • Debugging Python in Excel
      • Debugging with VS Code
      • Debugging with PyCharm
    • Working with Tables
    • Long Running Functions
    • Monte Carlo Simulations
    • Cell Formatting
    • RTD Array Functions
    • DOOM in Excel
    • NLP VLOOKUP using Scikit Learn
    • Deploying your PyXLL Add-in
  • API Reference
  • What’s new in PyXLL 5
  • Changelog
Close

Debugging Python in Excel¶

There will be times when developing your Python code you will run into problems and need to debug you code to understand what is going wrong.

The simplest form of debugging is to add logging or print statements to your functions and examine the output in the PyXLL log file. Certainly, looking at the log file is usually the first thing to do when faced with a problem!

For more complex debugging it is common to use an interactive debugger inside a Python IDE. An interactive debugger allows the user to step through code, line by line, examine variables, and see exactly what’s going on in the code.

The videos in this section cover deubbing using some of the more popular Python IDEs.

We recommend watching Writing Excel Functions in Python as a prerequisite to these videos.

  • Debugging with VS Code

  • Debugging with PyCharm

Debugging with VS Code¶

This tutorial will show you how to debug your PyXLL functions using the Visual Studio Code (or VS Code) IDE.

Using VS Code and PyXLL you can step through and debug your Python code running in Excel in the same way you can debug Python scripts started by VS Code.

Debugging with VS Code

This video covers the following topics:

  1. Attaching the VS Code debugger to Excel

  2. Solving a common problem with attaching the debugger

Also see our blog post Use VS Code to Debug Python Functions in Excel.

Debugging with PyCharm¶

This tutorial will show you how to debug your PyXLL functions using the PyCharm IDE.

To debug using PyCharm you need to be using the PyCharm Professional as the Community Edition does not have the remote debugging capability needed to debug code running in another process like Excel.

Debugging with PyCharm

This video covers the following topics:

  1. Configuring PyCharm for remote debugging

  2. Attaching to PyCharm from Excel

  3. Stepping through your Python code line by line

Also see our blog post Debug Python in Excel with PyCharm.

« Jupyter Notebooks in Excel
Working with Tables »
  • Home
  • Product
  • Features
  • Documentation
  • Download
  • Pricing
  • Support
  • Documentation
  • Videos
  • FAQ
  • Learn Python
  • Contact Us
  • About
  • About Us
  • Legal
  • Blog
© Copyright PyXLL Ltd