I would say, contrary to my original image and recommendation in this post, use the Manual mode of the Add-In Manager. Autodesk recommends using Manual Transaction mode as Automatic is being phased out.
I am going to take a guess that this has to do with the Transaction Mode.I am utterly confused at the moment, and have to concede that I don’t have a good explanation here, so I will instead offer to just look into this and amend this post when time comes that I have a good answer. It was brought to my attention that the three (3) different flavors of the Add-In Manager (Read Only, Manual and Manual Faceless) might actually be related to Transaction Modes.That’s it! You can now debug your Revit plugins much more effectively. You would attach yourself to Revit.exe process, the one that is currently open, and if you launch any of the methods from the Add-In Manager via Run command, it will let you step through the code, given that there are breakpoints that were hit.Just open Visual Studio and go to Debug>Attach to Process… Now if we want to Debug and step through the code, we can do that as well. We will let the addin manager handle it for us. That’s why it was important not to load any of the files via Addins folder anymore. We can test out our changes without restarting Revit. Now since we are pointing at the DLL that’s still in the visual studio’s BIN folder, we can basically just jump into Visual Studio, make changes, rebuild it, and then come back here, and it will automatically refresh itself. It will contain all of the External Commands and they will get listed in the list box above. We can just use the Load button and point it at the DLL that we want to load in. I know the image above has all the names blocked out, but it’s pretty straight forward to make out what’s going on.The Add-In Manager will scan it for External Commands and list them for us: Next up we can simply load the DLL we want to debug.It will allow us to Rebuild our project in Visual Studio and reload it into Revit without shutting down Revit. The important part here is to use the Read Only* Mode. Let’s load the DLL that we are interested in.Basically we want Revit NOT TO load it for us. One thing worth noting is that we NO LONGER need to copy any of the DLLs from the plugin that we are building into the Addins folders in Revit. Now that we have everything setup we can launch Revit.Since our DLL is in the same folder that the manifest file, we can just leave there the name of the dll itself. Open it up and make sure that you delete the from the line.
It’s the file with the *.addin extension. You will have to also change the contents of the Addin Manifest file.That should be at C:\ProgramData\Autodesk\Revit\Addins\2018\ Paste them into your main Addins folder for Revit.
For version 2018 this is the link: Download
Let me explain the steps and you will see why: If you are going to follow this method, you should not be using the Post Build events. Now this method runs a little contrary to something that I have posted a while ago about Post Build Commands and copying DLLs to Revit Addins folders automatically: Link The point is that this has been out there for a while, and makes debugging Revit addins quite easy. I am not sure why more people don’t use it, but it’s been talked about by people like Jeremy Tammik ( Link) in 2011 and later by Matteo Cominetti ( Link) in 2013. Well, the thing is that there was a solution to it out there for A LONG TIME. You know, that spiel about having to restart Revit, every time you make a change to your code. Ok, so I always hear people complain, that writing Revit Addins is horrible because it takes forever to debug them.