/blender:debuggingfrom blender
Use when Python or native code inside Blender gives a wrong value, raises, hangs, crashes, or never stops at a breakpoint, covering debug endpoints, stops by code kind, extension reloads, stack dumps, crash reports, native frames, and GPU captures
Ships in blender. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Covers code Blender runs on macOS, in a GUI or a background run. Use tool:debugging for the method, session answers, and the report. Use python:debugging for debugpy and interpreter behavior outside a host. Use blender:host for launching, driving, and quitting Blender and its logs. Use blender:extensions for extension builds, installs, and lifecycle.
[REFERENCES]:
[TEMPLATES]:
BLENDER_DEBUGPY_PORT launch, dumping stacks on signals.gputrace fileEach question takes one route:
| [INDEX] | [QUESTION] | [ROUTE] |
|---|---|---|
| [01] | Wrong value or raise in a running Blender | Signal endpoint ([02]), session ([03]) |
| [02] | Extension import or register() fails | Launch hold ([02]), session ([03]) |
| [03] | Script or command in a background run | Launch hold ([02]), session ([03]) |
| [04] | Hang | Signal endpoint ([02]), resume pause |
| [05] | Hang answering no pause, or a dead process | CRASH |
| [06] | Evaluation order, driver value, native or GPU | NATIVE |
Endpoints open through the template, installed once per scripts folder BLENDER_SYSTEM_SCRIPTS names for each launch:
blender --background --factory-startup --python-expr "import sys; print(sys.version_info[:2])" prints Blender's Python minorMACOSX_DEPLOYMENT_TARGET=$(sw_vers -productVersion) uv pip install --target <scripts>/modules --python-version 3.<minor> --python-platform aarch64-apple-darwin debugpy<scripts>/startup/debug_endpoint.py, which registers before extensions importtracer: pure python<temp>/blender-debug/<pid>.stacks<temp> is the launching shell's TMPDIR, getconf DARWIN_USER_TEMP_DIR for a GUI the Dock opened, and /tmp when that folder is missingRunning Blender opens its endpoint on a signal:
ps -o pid,command -p <pid> names the process, and ls <temp>/blender-debug/<pid>.stacks proves the template armed it
.stacks absent -> the process started before the install or its log holds ModuleNotFoundError: No module named 'debugpy'.stacks, as its default action terminateskill -USR2 <pid>, then <temp>/blender-debug/<pid>.port holds the port within seconds, a GUI idle in its event loop includedStartup and background code wait for a client from launch, run as a background command:
BLENDER_DEBUGPY_PORT=<port> blender --python-use-system-env --background --python-exit-code 1 --python <script.py> > <log> 2>&1
--no-window-focus in place of --background --python-exit-code 1 holds a GUI, which draws nothing and answers no Blender MCP call until a client attacheslsof -nP -iTCP:<port> -sTCP:LISTEN prints the listener, and no line means <log> holds the import errorBLENDER_DEBUGPY_PORT leaves the environment at startup, so Blender processes the run starts take their own port in their own launchmultiprocessing) run outside the sessionPYTHON* variables reach Blender under --python-use-system-env alone, PYTHON_FROZEN_MODULES=off among them for standard library breakpointsSessions attach once the endpoint listens:
session with the call below, its answer reading tracer: compiled, then state: runningresume wait answers the stop with frames, the exception, and locals{"action": "attach", "language": "python", "address": "127.0.0.1:<port>",
"breakpoints": [{"file": "<absolute source file>", "statement": "<text of the line>"}],
"exceptions": ["raised"],
"settings": {"pathMappings": [{"localRoot": "<source folder>", "remoteRoot": "<folder Blender loads the code from>"}],
"rules": [{"path": "<folder Blender loads the code from>/**", "include": true}, {"path": "**", "include": false}]}}
Arguments and their reasons:
raised with rules stops at a raise inside that folder alone, as Blender catches what operators, timers, handlers, and register() raiseuncaught stops in none of those callbacksrules apply in order and the first match decides, so the include stands firstpathMappings name an installed copy's source, code Blender loads from its source path taking nonetracer: pure python -> debugpy holds no compiled tracer for Blender's Python minor, install of [02] againTrigger from execute_blender_code of the blender MCP server once its GUI connection in blender:host works. The timer returns at once:
import bpy
def trigger():
<one call that reaches the code>
bpy.app.timers.register(trigger, first_interval=0.5)
result = {"scheduled": True}
exec as <string> under the server's file, where no breakpoint stops, while the files it calls stopbpy.ops.script.python_file_run(filepath="<absolute file>") runsevaluate, as read of a Panel value in draw reads every RNA member and has crashed Blenderevaluate runs no bpy.ops call, as an operator runs on the held main threadEach kind of code has its trigger and breakpoint:
| [INDEX] | [CODE] | [TRIGGER] | [BREAKPOINT] |
|---|---|---|---|
| [01] | Import, register() | Launch hold, reload ([05]) | Line, bpy.data restricted |
| [02] | Operator poll, execute | bpy.ops call, temp_override for an editor | Line in the method |
| [03] | Modal operator | 'INVOKE_DEFAULT' call in a GUI | Line with condition on event.type |
| [04] | Panel or menu draw | wm.redraw_timer(type="DRAW_WIN", iterations=1) | Line with a condition |
| [05] | Timer | Registration in a GUI | Line |
| [06] | Load or frame handler | File load, scene.frame_set(<frame>) | Line in the callback |
| [07] | Render handler, RenderEngine | bpy.ops.render.render() in a GUI | Line, stopping on the render thread |
| [08] | Driver function | scene.frame_set(<frame>) | Line in the function's file |
| [09] | --python <file> | Launch hold | Line |
| [10] | --python-expr | Launch hold | {"file": "<string>", "line": <n>} |
draw, modal, and depsgraph_update_post run many times a second, so their breakpoints take a condition--debug turns off mouse grab, so a stop inside a modal operator frees the pointer, and turns on memory checks that move timingPYDEVD_USE_SYS_MONITORING=0 loses stops in threads Blender creates (render jobs, driver evaluation)Reloads keep the process, the session, and its breakpoints:
resume continue, as no timer runs under a stopbpy.ops.extensions.package_install_files(filepath="<archive>", repo="<repository>", enable_on_install=True)register() and modules, and {'FINISHED'} ends the reloadReadings and the next action:
pending after a trigger -> module not loaded or path unmapped, evaluate sys.modules['<module>'].__file__ names the loaded filebound and no stop after a trigger -> code not reached, the log and Info reports name a failed poll or context, breakpoint one caller upbound, moved to line <n> -> loaded copy differs from source, diff <source file> <loaded file>, then reinstallbpy.context.preferences.extensions.repos names each folderresume wait, then continuepause stopping nothing -> main thread waits in native code or loops on one line, CRASH names the frameProofs repeat the trigger in the same process:
state: exited, code 0Cleanup leaves Blender as found:
<pid>.port and <pid>.stacksblender:hostWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub bsamiee/rasm --plugin blender7 skills in this plugin
/codingUse when writing or reviewing Python that runs inside Blender, covering bpy code from data references to host boundaries/extensionsUse when writing or reviewing a Blender extension's registration, preferences, or manifest, covering lifecycle and packaging/hostUse when driving Blender or reading bpy members from the installed build, covering host control and installed-extension workflows/interfaceUse when writing or reviewing Python that builds Blender's interface or draws in editors, covering interface elements and redrawOther plugins' skills for the same job