Python Debug Test
A Visual Studio Code extension that simplifies debugging Python tests by adding convenient debug buttons directly in your code.
Features
🔍 One-Click Debugging
- Debug pytest tests instantly
- Debug unittest tests with a single click
- Full debugging capabilities (breakpoints, variable inspection, step-by-step execution)
- No configuration needed - works out of the box!
Getting Started
- Install the extension from VS Code Marketplace
- Open a Python test file
- Look for the debug buttons above your test methods:
- "▶️ Run with pytest"
- "▶️ Run with unittest"
- Click and start debugging!
Requirements
- Visual Studio Code 1.97.0 or higher
- Python extension for VS Code
- Python 3.7 or higher
- pytest and/or unittest installed in your environment
Installation
- Open Visual Studio Code
- Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
- Search for "Python Debug Test"
- Click Install
- Reload VS Code if prompted
Features in Detail
Automatic Test Discovery
- Automatically detects test methods in your Python files
- Supports both pytest and unittest style tests
- Works with class-based and function-based tests
Smart Path Handling
- Automatically determines the correct test path format
- Handles both pytest and unittest path conventions
- Supports Django test discovery
Debug Configuration
- Automatically creates/updates launch.json
- Configures the appropriate test framework
- Sets up the correct working directory
- Handles Django settings automatically
Visual Feedback
- Clear indication of test locations
- Easy-to-use debug buttons
- Intuitive interface
Release Notes
0.0.1 (2024-02-17)
Initial release of Python Debug Test:
- Support for pytest and unittest
- Django integration
- Automatic launch.json configuration
- Debug buttons above test methods
0.0.2 (2025-04-23)
Improvements:
- Added buttons to run all tests in a class
- Enhanced visual appearance of unittest buttons with distinctive icons
- Improved class-level test support
0.0.3 (2025-04-23)
Changes:
Support
Need help? Have a feature request? Found a bug?
Credits
Created by Dimitri Caramello
LinkedIn
| |