How to debug dynamo from visual studio


I have followed this article Build DynamoRevit from Source · GitBook to build dynamo using the source code, everything is fine until it comes to debugging part.

when I debug by using “Attach to processor” method and set a break point there is an error message that the break point will not be hit.

I’m stuck at this point for couple of days trying to figure out how to debug.

Also can I debug by just using the dynamo sandbox instead?

yes, debug with sandbox - it’s much simpler -
If you want to debug DynamoRevit you need to go through the process to make sure Revit is loading your build, and not the version shipped with Revit - this is documented in the GitHub for DynamoRevit, but it’s not easy.


Thank you for reply.

is it documented how to use dynamo sandbox for debugging with visual studio?

I think I should clear my question, Can I run Revit nodes in Dynamo sandbox and debug them through visual studio using break points?

thanks for the clarification - no you cannot run DynamoRevit nodes (those which rely on the RevitAPI) in sandbox - those can only run in the Revit process.

It sounds like you’ll have to follow the instructions in the DynamoRevit repo for building your own version of DynamoRevit and Dynamo, disable the builtin DynamoForRevit addin, and point Revit to use your DynamoRevit-

unfortunately, the guide you are following is a bit out of date - it’s close, but there are some missing steps.

please try the instructions here:

Thank you so much! you were right the official documentation is outdated (shouldnt they update it?) and following github instruction correctly allowed me to use visual studio for debugging.

I still cannot hit the breakpoint but the message of missing PDB files is gone and since that was the question in this post i will mark it as solved.