r/grasshopper3d • u/CartographerThin2273 • 19d ago
Template for building and debugging Grasshopper plug-ins from VS Code
Edit: Thanks to u/Swennick for the .NET comment. The template now builds net10.0 for Rhino 9, net8.0 for Rhino 8 and net48 for Rhino 7. If you only use one Rhino version, delete the other targets in one line.
I used to develop GH plug-ins in Visual Studio because it builds the project, starts Rhino and lets you debug the .gha directly. VS Code has no equivalent, so I was copying the .gha into the Libraries folder and testing by hand.
I made a small template for this. Press F5 in VS Code and it builds the project, starts Rhino with Grasshopper open, loads the .gha from the output folder and attaches the debugger, so breakpoints work.
What's in it:
- A Visual Studio style solution (.sln, project folder, Properties) with one sample component
- One F5 profile per Rhino version: Rhino 9 (
net10.0), Rhino 8.21+ (net8.0), Rhino 7 (net48) - A setup script that renames everything and finds your Rhino installs
- A Claude Code skill that runs the setup for you
Windows only. You need VS Code with the C# extension and .NET SDK 10. Rhino 7 needs a one-time GrasshopperDeveloperSettings step because it doesn't read RHINO_PACKAGE_DIRS; the steps are in the README.
https://github.com/calvinlee6806/RhinoGH-VSCode-Starter
I've only tested F5 on Rhino 8. If you try it on Rhino 7 or 9, let me know how it goes. If something breaks, tell me what you see and I'll fix it.
2
u/leoluxx 5d ago
Really cool work! Thanks for sharing it. I need to test this out. I got so used to the vsCode IDE over the last years, that going back to VisualStudio Community is getting harder and harder.
1
u/Swennick 17d ago
You better start upgraging your plugins to .NET 10, net48 is wildly outdated and both net7 and 8 are out of support as of this week.