Remote Debugging with PyCharm or IntelliJ

May 25, 2026 · View on GitHub

Snowflake CLI can connect to a remote debug server started in PyCharm or IntelliJ, allowing you to debug any installation of the tool.

Requirements

  • The same source code loaded in your IDE as running in the debugged CLI installation
  • Open network connection to your IDE
  • pydevd-pycharm.egg file accessible on the machine where the CLI is installed (must match your IDE version)

Setup

  1. Create a "remote debug config" run configuration following steps 1-2 from the JetBrains tutorial. The defaults (localhost, port 12345) match the CLI defaults.
  2. Run your configuration in debug mode.
  3. Find pydevd-pycharm.egg in your IDE installation directory. Tips on locating it appear in the JetBrains tutorial and in the run configuration creation window.
  4. If the CLI and IDE are on the same machine, copy the path to the file. If the CLI is on another machine, copy the file there and note the path.
  5. Run the CLI with:
    snow --pycharm-debug-library-path <path-to-pydevd-pycharm.egg> <command>
    
    Example:
    snow --pycharm-debug-library-path \
      "/Users/xyz/Library/Application Support/JetBrains/Toolbox/apps/IDEA-U/ch-0/231.9011.34/IntelliJ IDEA.app.plugins/python/debugger-eggs-output/pydevd-pycharm.egg" \
      snowpark function list
    

Options

  • --pycharm-debug-server-host — override the debug server host (default: localhost)
  • --pycharm-debug-server-port — override the debug server port (default: 12345)

Code execution pauses before your command runs. You can resume, add breakpoints, and evaluate variables in the IDE's debug view.