Can't set breakpoints for debugging. Debug symbols are not being loaded for Add-in

2793
7
06-15-2011 07:07 AM
GaryGealy
New Contributor
I am trying to trying to debug a Add-in that I created following the method outlined in  http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/#//0001000001ms000000

everything is working fine but I am unable to set breakpoints.  I have followed the instructions from

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000002vs000000 is there another setting I am missing?


Thanks,
Gary Gealy
Mobile District U.S. Army Corps of Engineers Spatial Data Branch (OP-J) Bowhead Science & Technology (BST)
0 Kudos
7 Replies
KenBuja
MVP Esteemed Contributor
I've noticed that if I set breakpoints but haven't made any changes to my code since last debugging it, the breakpoints won't be hit. I have to make sure the project is built (either by making a insubstantial addition or building it manually) so the breakpoints are hit.
0 Kudos
GaryGealy
New Contributor
Thanks I will give that a try.

-GmG-
0 Kudos
GaryGealy
New Contributor
Nope, still not working
0 Kudos
GaryGealy
New Contributor
0 Kudos
AndrewBrown1
Occasional Contributor II
Does anybody still have issues with this?


The breakpoint will not currently be hit. No symbols have been loaded for this document.

It worked fine before merging two projects together, but now I get this error and it's totally throwing me off. Right now, I am unable to set debugging breakpoints. I tried various things, but nothing seems to work.

I'm using VS2010 with .NET 3.5.

Anybody have any tips?
0 Kudos
EdgarBejarano
Occasional Contributor
Normally I see
"The breakpoint will not currently be hit. No symbols have been loaded for this document."

whenever the Add-In has not been added to a toolbar in ArcMap.  In the case of Add-In buttons and tools, there is a property that you set upon creating the Add-In project in Visual Studio using one of the ArcGIS Add-In template that is called OnDemand.  If OnDemand is set to true, I notice that no breakpoints will be reached while debugging the Add-In (even if the Add-In button or tool is already added to ArcMap) until you click on the Add-In button or tool.  This is because the Add-In does not load I believe until enduser clicks on it.
0 Kudos
RichardWatson
Frequent Contributor
If Edgar's comments don't sort you out then the problem then I suggest that you verify that the code you built is actually running, e.g. display a message box.  My guess is that it is running something different than what you built.  This could relate to ESRIRegAsm which creates an ecfg (really a zip file) which you should find and look at the contents of.  The question is whether or not it is loading the correct code.

You can also run Process Explorer and find where it is loading your DLL from.  Maybe you put it in the GAC and then forgot to update the GAC so it is not running later builds?

Figuring this out should be simple.
0 Kudos