Fixing errors

Handle Python errors with LSP support and AI-powered quick fixes

Handling Errors in Python Cells

Livedocs includes Language Server Protocol (LSP) support to help you catch errors and warnings before you even run your Python cells.

How It Works

  • As you type, the LSP scans your code for syntax errors, undefined variables, type mismatches, and other issues.
  • Detected issues appear as squiggly underlines in the code editor.

Viewing and Understanding Issues

  1. Hover over an underlined section to see the error or warning message.
  2. Open the Problems panel from the status bar to see a full list of all issues in your notebook.

Quick Fix with AI Assistance

  • In the Problems panel, hover over any listed issue.
  • Click the bulb icon that appears.
  • This will add the issue directly into a chat session in the AI section.
  • The AI will then suggest fixes or rewrite the problematic code.

Benefits

  • Early detection: Catch issues before execution.
  • One-click fixes: Instantly get AI-generated solutions.
  • Improved productivity: Spend less time debugging, more time building.