How to Debug Rhino Compute

Can anyone provide some tips on how to debug Rhino Compute source code in Visual Studio?
I’m following these instructions but the console application closes out after the line Launching RhinoCore library as user {}

Here’s the error message:

Exception thrown: 'Nancy.Hosting.Self.AutomaticUrlReservationCreationFailureException' in Nancy.Hosting.Self.dll
The program '[4800] compute.geometry.exe' has exited with code 1 (0x1).

I’m using Visual Studio 2019 professional edition and I have the latest version of Rhino WIP installed.

Assuming you’re running the Debug configuration… compute.geometry will fail to start if you’ve previously run netsh http add urlacl url="http://+:8081/" user="Everyone".. Try running netsh http delete urlacl url="http://+:8081/" and launch the debugger again.

Annoyingly, compute.geometry does require manual URL reservation if you run it in Release, which is a pain if you’re debugging on the same machine that you use to run Compute. I’ll look into fixing that…

1 Like

Thanks @will , That solved that problem.
The other issue I’m having now is that the Breakpoints aren’t being hit.

RhinoCompute.cs is a file that isn’t actually compiled into the server project so you’ll never hit those breakpoints. That file is simply there so the server can hand back the C# client SDK when a user clicks on the “sdk” link

Place a breakpoint in the GeometryEnpoint Post function to see if you can hit that when you call the server from your client


Thanks @stevebaer, that did it.