/rhino:debuggingfrom rhino
Use when code running inside Rhino on macOS misbehaves and its cause is unproven (wrong value, hang, crash, breakpoint that never stops, refused attach), covering plug-in and Grasshopper 2 attaches, C# and Python 3 scripts, native stops, Rhino-hosted tests, triggers, logs, and re-signing
Ships in rhino. 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 Rhino 9 for Mac runs: compiled plug-ins and Grasshopper 2 components on Rhino's bundled .NET, RhinoCode C# and Python 3 scripts, native libraries a plug-in loads, and tests booting Rhino on its .NET host. Use tool:debugging for the method and session answers. Use dotnet:debugging for PDB document paths, DNCDbg readings, and dotnet-* diagnostics. Use python:debugging for debugpy. Use rhino:host for rhino-mcp-platform tools and launching or quitting Rhino. Use rhino:testing for the test host and its runs.
[REFERENCES]:
Facts read before a session, in order:
defaults read "/Applications/Rhino 9.app/Contents/Info" CFBundleVersion prints the build every later fact holds forcodesign -d --entitlements - "/Applications/Rhino 9.app" lists Rhino's entitlements
com.apple.security.get-task-allow -> McNeel's signature, and native code in Rhino takes [05]get-task-allow listed -> an earlier re-sign stands, and [05] restores McNeel's signature after the sessiondefaults read com.mcneel.rhinoceros.9 MRKeepDebuggableAfterUpdate answers that the pair does not exist
1 -> Rhino's next launch offers to re-sign itself: defaults delete com.mcneel.rhinoceros.9 MRKeepDebuggableAfterUpdate with Rhino quitpgrep -x Rhinoceros prints <pid>, the process each route takes
list_slots names <pid> before any other rhino-mcp-platform call, as an earlier call spawns a second RhinoRhino's process facts:
<rhcore> is the Resources folder rhino:host names, and <rhcore>/dotnet/arm64 holds the .NET Rhino runs managed code onget-task-allow, so lldb -p, dotnet-dump collect, and createdump are refused, sudo included, while DNCDbg, debugpy, and dotnet-stack attach<rhcore>/dotnet/arm64/dotnet holds get-task-allow, com.apple.security.cs.debugger, allow-dyld-environment-variables, and disable-library-validation, so a process it runs takes LLDB with no re-signopen -g -a "Rhino 9" --env <NAME>=<value> --args -nosplashSystem.Reflection.Metadata.MetadataUpdater.IsSupported false and Rhino unloads no plug-in, so changed code takes a quit and a launch<rhcore> name SourceLink URLs of McNeel's private repositories, so their frames show no sourceOne route per kind of code, by the language its session call takes:
| [INDEX] | [CODE] | [LANGUAGE] | [ROUTE] |
|---|---|---|---|
| [01] | Compiled plug-in, Grasshopper 2 component | dotnet | [03], [04] |
| [02] | C# script, Grasshopper 2 C# script component | dotnet | SCRIPTS |
| [03] | Python 3 script, Grasshopper 2 Python component | python | SCRIPTS |
| [04] | Native library or C++ SDK plug-in in Rhino | cpp | [05] |
| [05] | Test booting Rhino | dotnet, cpp | TESTS |
| [06] | Live hang, crash report, logs | None | [06] |
IronPython 2 scripts (#! python2) take the Script Editor's own debugger, opened by -_ScriptEditor _Open "<script>".
Triggers run from run_csharp, scheduled after its call returns, as a stop pauses every thread of Rhino, its MCP server included:
System.Threading.Tasks.Task.Delay(500).ContinueWith(_ => Rhino.RhinoApp.InvokeOnUiThread((Action)(() => <call reaching the code>)));
Trigger forms by code:
System.Threading.Tasks.Task.Run(() => <call>) in place of the scheduled callRhino.PlugIns.PlugIn.LoadPlugIn(<guid>) opens the scheduled callrun_command holds its call until the stop resumes, so resume wait runs beside itDOTNET_DefaultDiagnosticPortSuspend=1, which holds the runtime until the attach resumes itCompiled plug-in sessions run in order:
session attach with language dotnet, <pid>, and functions <Namespace.Type.Method> answers state: running
functions, as DNCDbg binds a line in one module aloneresume wait answers the stop, and no rhino-mcp-platform call answers until a resume runs Rhino onCompiled Grasshopper 2 components take [03] with their own trigger and reads:
[03], <document>.Solution.Start(<token>, SolutionMode.Headless) returning Task<Solution>Grasshopper2.UI.Editor.Instance.Canvas.Document is the open canvas's documentg2_solve_canvas cancels its solve after 60 seconds, a stop included, and reports Completed without reading the solution's phase, so no breakpoint stays armed through itSolution.Phase, then each component's State.Phase, State.Data.Messages, and State.FaultExceptionPluginServer.State failures and command GH2Plugins list each plug-in that failed to load, with kind and reasonStore after edits, so a breakpoint there takes a conditionNative code in Rhino needs get-task-allow, which a re-sign alone gives, while code a test reaches takes TESTS with none:
cp -c "/Applications/Rhino 9.app/Contents/MacOS/Rhinoceros" "/Applications/Rhino 9.app/Contents/_CodeSignature/CodeResources" <scratch>/ keeps McNeel's signed filesrun_command TestKeepDebuggable, then quit and launch Rhino, whose prompt "Make This Rhino Debuggable?" takes Re-sign and Restart
codesign -d --entitlements - "/Applications/Rhino 9.app" lists get-task-allowPAL_MachExceptionMode=2, as CoreCLR otherwise takes LLDB's stop at a library load and Rhino hangs in dlopensession attach with language cpp, <pid>, and settings {"postRunCommands": ["process handle SIGUSR1 -p true -s false -n false"]}, as CoreCLR suspends threads with SIGUSR1 and each signal otherwise stops Rhinobreakpoints by the absolute path of the source file, or functions for an exported entry[03], then resume waitNative rules in Rhino:
PAL_MachExceptionMode=2 turns Rhino's managed debugger off, so a managed and a native session each take a launch of their owncom.mcneel.rhinoceros.9, as Rhino calls _Exit(1) at launch under any otherMRKeepDebuggableAfterUpdate deleted, both copies back in place, codesign --verify --strict "/Applications/Rhino 9.app" silent, then Full Disk Access switched on in System SettingsReads that stop nothing:
dotnet-stack report -p <pid>, dotnet-trace, and dotnet-counters read McNeel-signed Rhino~/Library/Logs/DiagnosticReports/Rhinoceros-<time>.ips, xcrun crashlog --mode batch <report> names native frames, and managed frames stay addressesRhMacSignalHandler in a crashed thread is Rhino's abort path and names no cause, so each frame below it is readlog show --predicate 'subsystem == "com.mcneel.rhinoceros"' --last 30m --style compact prints commands, plug-in loads, and command window lines, and keeps recent lines alone~/.rhinocode/logs/rhinocode_<pid> holds RhinoCode's server and script events of one Rhino process~/Library/Application Support/Grasshopper2/Diagnostics/*.ghlog is binary, read by run_csharp with #r "Grasshopper2.dll" printing each entry of Grasshopper2.Diagnostics.Logger.Diagnostics("<file>")~/Documents/RhinoDebugMessages.txt holds Rhino's native debug lines once command TestEnableDebugLogging turned them onrun_csharp printing Rhino.RhinoApp.CommandHistoryWindowText through Console.WriteLine gives each command line of the session, as run_command turns CommandWindowCaptureEnabled off when it endsReadings in Rhino, meaning, action:
rhino-mcp-platform call times out, or run_csharp fails with TaskCanceledException -> a session holds Rhino stopped -> resume wait, then continuebound with no stop in library code -> a copy in another loaded plug-in holds the line -> functions breakpointYou are debugging a Release build of <assembly> in read output -> it loaded before the attach and stops nowhere -> Debug build installed, or a startup triggerSIGUSR1 -> the attach lacked its process handle line -> repl process handle SIGUSR1 -p true -s false -n false, then resume continueMRKeepDebuggableAfterUpdate is set -> close it without re-signing, then gate step 3g2_solve_canvas answers Completed while objects hold no data -> its 60-second limit cancelled its solve -> solve in the form of [04]dotnet-stack and a new attach time out -> force quit Rhino and launch againFix and proof, in order:
session detach, then Rhino quit, as a loaded plug-in stays loadedrhino-mcp-platformrhino:testingCleanup beside tool:debugging: MRKeepDebuggableAfterUpdate deleted, McNeel's signature restored by [05], scratch copies and logs deleted, each Rhino the task opened quit, and each .NET process a Rhino held by DOTNET_DefaultDiagnosticPortSuspend started (RhinoCycles' kernel compiler) ended by its pid, as each inherits it and waits. Reports add Rhino: with the build of gate step 1 and Signature: as McNeel's or re-signed.
What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/hostUse when driving a Rhino document, .3dm file, or Grasshopper 2 canvas, or writing C++ against the Rhino SDK, covering background MCP sessions and the C++ SDK/testingUse when writing, running, or debugging tests of code that calls RhinoCommon, Grasshopper, or Grasshopper 2, covering in-process hosts, macOS setup, CI, and test designOther plugins' skills for the same job
npx claudepluginhub bsamiee/rasm --plugin rhino