I've inherited a model that runs without errors when opened and executed in edit mode. However, when I simply open the model and run it directly, it throws an error. Since it works in edit mode, the usual debugging method of observing what turns red isn't helpful. I'm struggling to pinpoint the source of the error.
Is there a way to modify the model, to help me debug the model, and track its flow and narrow down the location of the error?
The model itself is huge, and I would rather not have to rebuild it. Based on the limited messages, it appears to be failing in the later third of the model.
Any help on how to debug the model would be greatly appreciated.
Copy-paste the model to another toolbox, pop it open, delete some tools from the tail, run it, and repeat with greater and greater cuts until the errors vanish. Once it's working you can make another copy, trim one tool less and see if that triggers an error. You can then build a model that runs that tool with more and more preceding tools until the error triggers again. This is exactly as tedious as it sounds but these excisions are the best way to solve the issue.
@DavidSolari I apricate the tip and will give it a go. While it does sound tedious, it is better than my plan of exporting to python hoping the error continues. And add print prompts to annoyingly track the model.
I'd say it's worth exporting the model to Python just to see how Pro translates it. If you're on 3.4 you might get lucky if you throw that script into a modern editor and go red squiggly hunting.
If I was in your shoes my long term plan would be to port the model by hand and apply as many Python-only optimizations as I could (e.g. looping over feature class names for export, using cursors and lookup tables where possible etc. etc.) but that's a daunting task for a model that size so beating it into a working state would be my #1 priority.