atxtechbro / atxtechbro/dotfiles
Enhance launch.json.example with realistic pytest debugging configuration
- Dominant language
- Shell
- Stars
- 27
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
## Feature Request: Enhance launch.json.example with Realistic Pytest Configuration
### Description
Our current `launch.json.example` is too simplistic and doesn't reflect real-world debugging scenarios, particularly for Python projects using pytest. We should update it with a more comprehensive example that demonstrates advanced features like declarative breakpoints, pytest arguments, and environment configuration.
### Current launch.json.example
```json
{
"version": "0.2.0",
"configurations": [
{
"type": "python",
"request": "launch",
"name": "Launch Current File",
"program": "${file}",
"console": "integratedTerminal"
},
{
"name": "Launch C/C++ Program",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/build/",
"args": [],
"cwd": "${workspaceFolder}"
}
]
}
```
### Proposed Enhanced Example (with Austin, TX themes)
```json
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Barton Springs Tour Guide",
"type": "python",
"request": "launch",
"module": "pytest",
"console": "integratedTerminal",
"justMyCode": false,
"env": {
"PYTHONPATH": "${workspaceFolder}"
},
"args": [
"-v",
"-k", "LadyBird and zilker_entrance",
"--no-header",
"tests/austin_tours"
],
"cwd": "${workspaceFolder}",
"breakpoints": [
{
"path": "${workspaceFolder}/src/tours/locations/springs_location.py",
"line": 42
},
{
"path": "${workspaceFolder}/src/tours/locations/springs_location.py",
"line": 78
},
{
"path": "${workspaceFolder}/src/tours/base_location.py",
"line": 103
}
]
},
{
"name": "Debug Sixth Street Music Venue",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/src/music/venue_manager.py",
"args": ["--venue", "continental_club", "--event", "blues_night"],
"console": "integratedTerminal",
"env": {
"AUSTIN_API_KEY": "${env:AUSTIN_API_KEY}",
"DEBUG_LEVEL": "verbose"
}
},
{
"name": "Debug BBQ Competition API",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "src/bbq/app.py",
"FLASK_ENV": "development"
},
"args": [
"run",
"--no-debugger",
"--port", "5000"
],
"jinja": true
},
{
"name": "Debug C++ Trail Mapper",
"type": "lldb",
"request": "launch",
"program": "${workspaceFolder}/build/greenbelt_mapper",
"args": ["--trail", "violet_crown", "--format", "gpx"],
"cwd": "${workspaceFolder}"
}
]
}
```
### Benefits of the Enhanced Example
1. **More Realistic Scenarios**: Shows real-world debugging configurations for different types of Python applications (pytest, scripts, Flask)
2. **Demonstrates Advanced Features**:
- Declarative breakpoints in the pytest configuration
- Environment variable configuration
- Module-based execution
- Test filtering with pytest arguments
- Working directory configuration
3. **Educational Value**: Helps users understand the full capabilities of the debugging system
4. **Maintains Variety**: Still includes C++ example for cross-language support
### Implementation Notes
- The example uses Austin, Texas themes (Barton Springs, Lady Bird Lake, Sixth Street, etc.) instead of actual project names
- No real repository names or variable names are included
- The structure demonstrates proper organization for different types of projects
- The breakpoint examples show how to set up declarative breakpoints in different files
This enhancement aligns with our "spilled coffee" principle by providing more comprehensive examples that users can adapt to their specific needs without having to research DAP configuration options from scratch.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.