Using Revit Viewer 2018 to Debug in Visual Studio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, forum!
I’ve recently started using Visual Studio to code add ins for Revit and would like to be able to debug right from the VS console. Unfortunately, I only have access to Revit Viewer. I’ve tried putting the file path to the Revit.exe file under Project > Properties > Debug > Start External Program and adding “/viewer” to the command line arguments, but it always causes Revit to crash with error x0. Using the Revit Viewer shortcut file path also results in an error as VS expects a .exe file. The only work around I’ve found so far is to run the add in directly from an open Revit Viewer window, but then I lose access to the debugging tools in VS.
On Jeremy Tammik's suggestion, I opened Revit Viewer and used "Attach to Process" to run my add in and debug it. So far, that's been working well (Thanks, Jeremy!), but I'm still curious to know if anyone has come up with a way to make Revit Viewer open when the addin is run.
Thanks!