Debug Python Add-Ins with Breakpoints

279
1
10-16-2014 03:14 PM
Status: Open
ThomasStanley-Jones
New Contributor III
I really want to be able to add breakpoints into a Python Add-In for debuggin purposes.  Being able to look around at the variable values and see what's going on would save sooooooo much time.  As it is, this can only be done with print statements in the code.  But when you don't know what is going wrong, it's really hard to write a print statement that will tell you what you need to know without some experimentation.  Every time a statement is changed, there is a 3-4 minute process of
 - compile the add-in,
 - install the add-in,
 - close Arc,
 - reopoen Arc,
 - run the add-in,
 - realize you misspelled the variable name,
 - repeat...
Please find a way to use breakpoints in Python Add-ins!
1 Comment
ClintonDow1

Just in case anyone comes upon this, it is entirely possible to set debug breakpoints in an ArcPy script within an IDE such as PyCharm. There is documentation on how to achieve this on esri blogs etc.