pydebug-setup

Automate Python debugging environment setup for Bazel targets.

1|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/dukebw/dotfiles --skill pydebug-setup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pydebug-setup
Source: https://github.com/dukebw/dotfiles/tree/main/.claude/skills/pydebug-setup
Command: npx skills add https://github.com/dukebw/dotfiles --skill pydebug-setup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill automates the creation of Python debugging environments for Bazel targets, enabling seamless remote debugging with Neovim's nvim-dap and debugpy.

Core Features & Use Cases

  • Target discovery: Queries Bazel for py_binary and py_test targets.
  • Deployment automation: Caches target results, creates a virtual environment, and installs debugpy for remote debugging.
  • Use Case: When you need to attach a debugger to a Bazel-built Python target running on a remote host, this skill streamlines target selection and environment setup.

Quick Start

Run pydebug-setup to discover Bazel Python targets, create a venv with debugpy, and configure Neovim for debugging. Use pydebug-setup -r to refresh the target cache, -n for a dry-run, or -l to run locally instead of via rexec.

Frequently Asked Questions about pydebug-setup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up remote Python debugging for Bazel targets in Neovim?

To set up remote Python debugging for Bazel targets, this skill queries Bazel for py_binary and py_test targets, creates a virtualenv, installs debugpy, and configures Neovim's nvim-dap for remote debugging.

What's the best way to debug a Bazel py_test target running on a remote host?

The best way to debug a remote Bazel py_test target is using this skill to automate target selection via fzf, deploy a virtualenv with debugpy installed, and attach Neovim's nvim-dap to the remote process.

Does this Python debugging setup require fzf and Bazel to function?

Yes, this Python debugging setup requires fzf for interactive target selection, Bazel (bazel or bazelw) for querying build targets, rexec for remote execution, and network access to install debugpy.

Can I run the Bazel Python debugger configuration locally instead of using remote execution?

Yes, you can run the Bazel Python debugger configuration locally by passing the -l flag, which bypasses rexec and executes the virtualenv creation and debugpy setup on your local machine.

How do I refresh the cached Bazel target list when setting up the Python debug environment?

To refresh the cached Bazel target list when setting up the Python debug environment, run pydebug-setup with the -r flag, which forces a new query for py_binary and py_test targets instead of using stored results.

Why use a dry run for Bazel Python debugging environment setup?

Using a dry run with the -n flag for Bazel Python debugging setup allows you to preview target discovery and environment configuration actions without actually creating the virtualenv or installing debugpy.