Rhino 7 Mac Plugin Debug - Symbol not loading, cannot hit breakpoints

I’ve just started running into an issue with trying to Debug Rhino 7 Mac plugins using Visual Studio 2022 on a Mac. Up until a few weeks ago, everything worked perfectly. Now, when I try to debug a plugin, Rhino 7 will start, the rhp and pdb are generated, the new build is loaded into Rhino properly, but the breakpoints are all “hollow” in Visual Studio when you run the command, and never get hit. When you look at the Modules tab, you can see that the rhp files are marked as User Code = No, and have Skipped Loading. It is also marked as Optimized = Yes, which often causes Visual Studio to consider the dll a Release version and not seek a .pdb file, but in the Project Properties, Enable Optimizations is not checked.

To test that it’s not an issue with my existing file, I started a completely new boilerplate project from the latest mpack Visual Studio Rhino Extension, and the behavior is identical. See the screenshot series below. Note that the NuGet Rhinocommon and my installed Rhino versions are different—but previously this has not mattered.

Visual Studio for Mac Version 17.6.1 (build 452).

Please let me know if there’s any way to get this up and running again!





Hey @andrew.chittenden,

This is likely due to an issue renaming the .pdb properly. The Rhino extension for VS 2022 on Mac should be renaming your .pdb like so: MyPlugin.pdb > MyPlugin.rhp.pdb after compilation, but it looks like a Visual Studio update broke that. One thing you can do is create a post-build target that copies the pdb to rhp.pdb so that can be found when debugging. Something like this:

  <Target Name="CopyPdbForDebug" AfterTargets="AfterBuild">
      <Copy SourceFiles="$(OutputPath)$(AssemblyName).pdb" DestinationFiles="$(OutputPath)$(AssemblyName).rhp.pdb" />
  </Target>

I’ve submitted RH-75898 to look at getting that automated again, if possible.

Hope this helps!

Thanks for the fix! Adding that code to the csproj file indeed did the trick. And I appreciate you submitting the issue for getting this back to being fully automated!

I had similar issue with break points on the template grasshopper plugin, note that the fix by @curtisw worked for me by copying to gha.pdb:

<Target Name="CopyPdbForDebug" AfterTargets="AfterBuild">
      <Copy SourceFiles="$(OutputPath)$(AssemblyName).pdb" DestinationFiles="$(OutputPath)$(AssemblyName).gha.pdb" />
</Target>