Select to view content in your preferred language

Debugging an Addin?

2809
3
11-20-2010 06:23 PM
FrankPerks
Emerging Contributor
Hi,

I was wondering if there is anyway to use debugging(break points + etc) when working with an ArcGIS addin? It seems that my breakpoints are never hit.

Using Visual studio 2010 + ArcGIS 10. Any ideas?

*EDIT* Fixed it, for whatever ever reason removing the extension, and deleting the add-in manually, then rebuilding it allowed my breakpoints to actually be hit.
0 Kudos
3 Replies
TomCohen
Regular Contributor
Hi,

Could you please elaborate on this fix? Sometimes my ArcMap add-in breakpoints are recognised, but most of the time Visual Studio just says "This breakpoint will not currently be hit. The source code is different from the original version."

I have tried manually deleting and re-adding the add-in but it no longer seems to make a difference. Can you provide the steps you went through? I think part of the problem is that the add-in is copied over to its new location in user-dir\ArcGIS\add-ins etc. when added to the application.

Any help much appreciated.
0 Kudos
FrankPerks
Emerging Contributor
Hi,

Could you please elaborate on this fix? Sometimes my ArcMap add-in breakpoints are recognised, but most of the time Visual Studio just says "This breakpoint will not currently be hit. The source code is different from the original version."

I have tried manually deleting and re-adding the add-in but it no longer seems to make a difference. Can you provide the steps you went through? I think part of the problem is that the add-in is copied over to its new location in user-dir\ArcGIS\add-ins etc. when added to the application.

Any help much appreciated.


Pretty much i just did as i posted, disable extension, delete add-in, close, do a clean, and then manaully clean out your /obj and /bin folders. Rebuild it.

However this happened way to frequently for me, so i just dropped the whole add-in model, and went back to the old method.
0 Kudos
TomCohen
Regular Contributor
Thanks for the feedback, the reason I asked for more details was that I was already following the steps you listed in your email and this had worked a couple of times, but when it totally stopped working I thought there might be a specific workflow around things like exiting ArcMap using the close button or killing the debugger or other such peculiarities.

Anyway, my problem appears to have been (perhaps temporarily) solved by a restart. With fixes like this I could be an IT Technician!
0 Kudos