From ue5-dev-tools
Setup VSCode for F5 Python debugging in UE5 editor. Use when users need to (1) configure VSCode for UE5 Python debugging, (2) setup debugpy remote debugging workflow, (3) enable breakpoint debugging in UE5 Python scripts, or (4) create VSCode launch/task configurations for UE5.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ue5-dev-tools:skills/ue5-vscode-debuggerThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Configure VSCode for F5 debugging of Python scripts running in Unreal Engine 5 editor via debugpy remote debugging.
Configure VSCode for F5 debugging of Python scripts running in Unreal Engine 5 editor via debugpy remote debugging.
Required Skill: ue-mcp (for general remote execution)
This skill includes its own remote-execute.py for specialized debugging tasks, but relies on ue-mcp for:
Configure VSCode with debugging launch and task configurations:
# Auto-detects project from CLAUDE_PROJECT_DIR
python scripts/setup-vscode.py
# Or specify project path explicitly
python scripts/setup-vscode.py --project /path/to/ue5/project
# Force overwrite existing configurations
python scripts/setup-vscode.py --force
This automatically creates:
.vscode/launch.json - Debug configurations for attaching to UE5.vscode/tasks.json - Tasks for starting debugpy server and executing scriptsNote: Requires debugpy installed in UE5's Python environment.
For new UE5 projects that need VSCode debugging:
Ensure UE5 project is configured:
# Use ue-mcp or direct python command
ue-mcp configure
Setup VSCode configurations:
python scripts/setup-vscode.py
Install debugpy in UE5's Python:
python scripts/remote-execute.py \
--code "import subprocess; subprocess.run(['pip', 'install', 'debugpy'])"
Test debugging:
For interactive Python development with breakpoints:
For debugging already-running debugpy servers:
Manually start debugpy server in UE5:
python scripts/remote-execute.py \
--file scripts/start_debug_server.py
In VSCode, select "UE5 Python: Attach Only" configuration
Press F5 - debugger attaches without executing a script
Generates VSCode debugging configurations for UE5 Python.
Key features:
CLAUDE_PROJECT_DIRCLAUDE_PLUGIN_ROOTUsage examples:
# Setup current project (auto-detected)
python scripts/setup-vscode.py
# Setup specific project
python scripts/setup-vscode.py --project /path/to/ue5/project
# Force overwrite existing configurations
python scripts/setup-vscode.py --force
Environment variables:
CLAUDE_PROJECT_DIR - Project root (auto-injected by Claude Code)CLAUDE_PLUGIN_ROOT - Plugin root (auto-injected by Claude Code)Generated Configurations:
launch.json:
tasks.json:
Python script executed in UE5 editor to start debugpy remote debugging server.
Key features:
Execution:
# Via scripts/remote-execute.py
python scripts/remote-execute.py \
--file scripts/start_debug_server.py
Output format:
[UE5-DEBUG] Starting debug server setup
[UE5-DEBUG] debugpy server listening on 127.0.0.1:19678
[UE5-DEBUG] Waiting for debugger attachment...
[UE5-DEBUG] READY
To change port:
scripts/start_debug_server.py (modify port number).vscode/launch.json (update "port" field in configurations)By default, local and remote paths are identical:
"pathMappings": [
{
"localRoot": "${workspaceFolder}",
"remoteRoot": "${workspaceFolder}"
}
]
When to customize:
This skill leverages Claude Code environment variables for seamless integration:
Auto-injected by Claude Code, pointing to the current project root.
Used by:
setup-vscode.py - Auto-detects project location for VSCode config generationExample:
# When CLAUDE_PROJECT_DIR=/Users/me/MyUE5Game
python scripts/setup-vscode.py
# Creates .vscode/ in /Users/me/MyUE5Game
Auto-injected by Claude Code, pointing to the plugin root directory.
Used by:
setup-vscode.py - Locates executor skill's scripts for task configurationFallback:
skills/ue5-vscode-debugger/scripts/setup-vscode.py)Uses debugpy (Python's Debug Adapter Protocol implementation):
start_debug_server.py runs in UE5, starts debugpy on port 19678VSCode Extensions:
Python Packages in UE5:
debugpy - Install via pip in UE5's Python environmentUE5 Configuration:
Causes:
Solutions:
# Install debugpy in UE5
python scripts/remote-execute.py \
--code "import subprocess; subprocess.run(['pip', 'install', 'debugpy'])"
# Verify debugpy server starts
python scripts/remote-execute.py \
--file scripts/start_debug_server.py
# Check port availability
lsof -i :19678
Causes:
Solutions:
localRoot and remoteRoot in launch.json match actual pathsCauses:
Solutions:
# Verify remote-execute.py installed
ls scripts/remote-execute.py
# Check UE5 configuration
# Use ue-mcp to check configuration
ue-mcp configure --check-only
# Test remote execution
python scripts/remote-execute.py \
--code "print('test')"
Develop complex UE5 Python scripts with full debugging:
# Setup VSCode once
python scripts/setup-vscode.py
# Then develop iteratively:
# 1. Edit Python file
# 2. Set breakpoints
# 3. Press F5
# 4. Inspect variables, step through logic
# 5. Fix issues and repeat
Debug complex asset processing logic:
# process_assets.py
import unreal
def process_asset(asset_path):
# Set breakpoint here to inspect asset
asset = unreal.load_asset(asset_path)
# Step through processing
# Inspect asset properties in VSCode
pass
# Press F5 to debug
process_asset("/Game/MyAsset")
Debug editor automation workflows:
# automation.py
import unreal
def generate_thumbnails():
# Breakpoint to verify editor state
editor_lib = unreal.EditorLevelLibrary()
# Step through automation
# Watch variables in VSCode
pass
# F5 debug to verify each step
Extend tasks.json for project-specific workflows:
{
"label": "ue5-run-tests",
"type": "shell",
"command": "python",
"args": [
"${env:CLAUDE_PLUGIN_ROOT}/skills/ue5-vscode-debugger/scripts/remote-execute.py",
"--file",
"${workspaceFolder}/tests/run_all.py"
]
}
Add custom debug configurations to launch.json:
{
"name": "UE5 Python: Debug Tests",
"type": "debugpy",
"request": "attach",
"connect": {
"host": "127.0.0.1",
"port": 19678
},
"preLaunchTask": "ue5-run-tests"
}
Use F5 debugging for complex logic - Breakpoints and variable inspection save time
Start debugpy server manually for long sessions - Use "Attach Only" to reconnect
Verify debugpy installation before first debugging session
Keep VSCode workspace at UE5 project root for correct path mappings
Use structured logging in production scripts, F5 debugging for development
npx claudepluginhub chengdagong/ue5-dev-tools --plugin ue5-dev-toolsExpert guidelines for Unreal Engine 5.x C++ development covering UObject lifecycle, reflection system, performance patterns, and Epic's naming conventions.
Drives Unreal Engine 5.7/5.8 via MCP with engine-level gotchas, silent-fail edges, crash patterns, and proven call sequences. Activates on UE5/MCP tool detection or UE terms.
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.