Debug mode

Debug mode

abajenov
Contributor Contributor
1,303 Views
1 Reply
Message 1 of 2

Debug mode

abajenov
Contributor
Contributor

Can anybody help me. I am new to API and decided to use debug mode for better understanding of my code. However, every debugging session launches a new instance of Revit. Is there any way to debug file that is already opened? And maybe somebody know, how to pin variables forever. They disappear when I stop debugging. Google didn't help me with that. Thank you in advance and have a nice day!

0 Likes
Accepted solutions (1)
1,304 Views
1 Reply
Reply (1)
Message 2 of 2

jeremy_tammik
Alumni
Alumni
Accepted solution

Yes, there are several ways to debug in an existing Revit session. One way is to 'attach to process':

  

  

You can also launch Revit.exe inside the Visual Studio debugger and then use the 'hot reload' feature to update you code when you make a modification:

  

  

The Building Coder lists more possibilities for Edit and Continue, Debug without Restart, Live Development:

  

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes