Efficient Plugin Debugging Routine with Visual Studio

Hello everyone,

I am in the process of trying to improve my C# development routine and was wondering if there are any professional (C#) plugin developers here who are willing to share some knowledge or best practice about this topic.
More specifically, I was wondering about the compiling / debugging process in Visual Studio. Originally, I worked in Visual Studio based on this tutorial: Rhino - Your First Plugin (Windows). However, it involves restarting Rhino every time you change and rebuild your code, which tends to take quite some time.
After some digging, I also found this workshop: [Part 3/6] C# Scripting and Plugin Development for Grasshopper - YouTube. With the process presented there, you do not need to restart Rhino any more but only need to reopen your files, together with using the Rhino command “GrasshopperReloadAssemblies”.
This is already a huge step towards faster debugging and testing for me, but I was wondering if there is an even better way of building your code and reloading the gha definition in Grasshopper. How do the professional plugin developers go about this in their every day life?

Besides that, if anyone has any other tips, tricks or useful resources about plugin development in C# to share, that is also always much appreciated!

Many thanks in advance!

Start a debugging session from VS and use hot reload to force-push code changes.

Also, look into setting breakpoints in your code and stepping through the execution stack.

We use this method, also for .gha add-ins.

Thank you two very much for the answers! I guess I would prefer the shim project approach over the force-pushes, to be on the save side. However, the shim also appears to be more complicated to implement for a beginner, since it has to be adapted to Grasshopper. @menno do you have any recommendations or code examples how to make this work for GH plugins?