program  don't stop on breakpoints!

2592
3
Jump to solution
04-09-2013 03:14 PM
AnatolySenchenko
New Contributor
At debugging of add-ins for ArcMap the program does not stop on breakpoints! Breakpoints marked exclamation [ATTACH=CONFIG]23359[/ATTACH].  Why?
0 Kudos
1 Solution

Accepted Solutions
RichardWatson
Frequent Contributor
The point has been discussed before:

http://forums.arcgis.com/threads/16137-.NET-4-DLL-in-3.5-Add-in-(Or-.NET-4-Add-in-not-Debugging)
http://gis.stackexchange.com/questions/13606/why-cant-the-breakpoint-be-hit-when-debugging-an-arcgis...

My best guess is that you are using either the 4.0 or 4.5 framework and have not modified ArcMap.exe.config to indicate this.  Suggest that you make a copy of this file and then edit it.  You need to uncomment the XML fragment at the top of the file which corresponds to the version of the framework that you are using.  I believe that you can list multiple frameworks so you only need to modify 1 line in the file to add yours.  This is an extract from mine:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup>
    <supportedRuntime version="v4.0.30319"/>
    <supportedRuntime version="v2.0.50727"/>
  </startup>

View solution in original post

0 Kudos
3 Replies
TeoD_Smyrni
New Contributor
Obviously debugger fails to attach to running ArcMAP process. Try closing all ArcMaps that are open. Rebuild, close-open visual studio project, check with Task Manager if any ArcMap processes left running. If there are - kill them. This manupulations work for me.
0 Kudos
RichardWatson
Frequent Contributor
The point has been discussed before:

http://forums.arcgis.com/threads/16137-.NET-4-DLL-in-3.5-Add-in-(Or-.NET-4-Add-in-not-Debugging)
http://gis.stackexchange.com/questions/13606/why-cant-the-breakpoint-be-hit-when-debugging-an-arcgis...

My best guess is that you are using either the 4.0 or 4.5 framework and have not modified ArcMap.exe.config to indicate this.  Suggest that you make a copy of this file and then edit it.  You need to uncomment the XML fragment at the top of the file which corresponds to the version of the framework that you are using.  I believe that you can list multiple frameworks so you only need to modify 1 line in the file to add yours.  This is an extract from mine:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <startup>
    <supportedRuntime version="v4.0.30319"/>
    <supportedRuntime version="v2.0.50727"/>
  </startup>
0 Kudos
AnatolySenchenko
New Contributor
I uncomment the XML fragment - 1 line (<supportedRuntime version="v4.0.30319"/>) and  breakpoints work!
Thank you!
0 Kudos