Solved

Breakpoints not hit in C# debug when attaching to process IE

Posted on 2009-05-14
16
2,338 Views
Last Modified: 2013-12-17
I'm developing a toolbar for internet explorer using Visual Studio 2008 and I purchased Add-in express software to help get the toolbar up and running quickly.  To debug I have to use the attach to process and select the Internet Explorer process that's running.  It used to hit all the breakpoints in both the add-in express events triggered from IE and my project that is called when the events are triggered.  Then it would only hit the add-in express breakpoints and the breakpoints within my project would read "breakpoint will not be hit - no symbols loaded."  Now it won't hit any breakpoints at all.  I've tried clearing out the bin and debug folders with no success.  This solution in VS is one where you have to run as admin and right click on the project and choose "register the adx project" for the updates in the code to transfer over to the IE toolbar.  Any suggestions in getting my breakpoints back
0
Comment
Question by:nod09
  • 8
  • 7
16 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 24394497
What is the setting in IE for Browsing | Disable Script Debugging (IE) on Tools | Internet Options | Advanced tab?
0
 

Author Comment

by:nod09
ID: 24398026
Well, that was part of the solution thanks.  I checked the box to disable script debugging and  I can now hit the breakpoints from IE toolbar events, but I still can't hit the breakpoints in my project.  They give the "no symbols loaded" error.  Now I'm getting "the following module was built either with optimizations enabled or without debug information."  The build config is in debug mode.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 24398172
So, you have the IDE open in a session, and you have attached to the Internet Explorer process, and you can't get it to break.  That is a tough question to answer, since that is a very complicated debugging scenario.  

I see that you mentioned Add-In Express:

Add-in Express" for Internet Explorer® and Microsoft® .net
http://www.add-in-express.com/programming-internet-explorer/developing-addons.php

I don't know anything about this tool, and how it relates to .NET.

I did find this in that article:

"To debug your add-on, specify iexplore,exe (on my PC, C:\Program Files\Internet Explorer\iexplore.exe) in the Start External Program property of your add-on project and run the project."

Have you done that?

0
 

Author Comment

by:nod09
ID: 24400756
Yes, the IDE is open and attached to an IE process as described above.  There are two projects in the solution.  One of them is the add-in express project that handles all the toolbar design and events and the second one contains all of my classes for algorithms when the events are triggered from IE. The breakpoints work in the add-in express project such as an event when the page download is complete.  This event also creates a new object of a class in the other project, but no breakpoints are hit in the other project.  The debugger reads "This breakpoint will not currently be hit.  No symbols have been loaded for this document.  At one point these breakpoints were working but not anymore.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 24402272
There are possibilities, but no promises...

What Internet Explorer version are you running?  What does your development environment look like?  Have you tried talking to Add-In Express tech support?
0
 

Author Comment

by:nod09
ID: 24403006
IE 7 which supports the toolbar.  I've been able to build the toolbar to a release version for testing and install it on another machine no problem.

Yes, I've been emailing add-in express tech support as well and all they've come up with so far is I'm not attached to the right IE process.  I know that I'm attached to the right IE process as it's the only one open and it is working ok because the IE event breakpoints are being hit.  

Not sure what you're after about my development environment.  The code is all on one machine and the files are local.  I am using a local SQL Server Express database as well.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 24403942
Are you running on Windows Vista?  Do you have any service packs installed?  These are the kinds of things that can change that make it difficult to debug like you used to be able to.

Are you running in a release mode or debug mode?  Is there a .pdb file?
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

by:nod09
ID: 24404682
Vista Business SP1
Debug mode
Yes, there's a .pdb file
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 24408267
Vista has been one big pain in my back side.  Did this always run on Vista or did it move from XP?  Did this possibly run before you applied Vista SP1?
0
 

Author Comment

by:nod09
ID: 24408994
This toolbar solution has always been on Vista although one of the projects in the solution may have started on an XP test box.  Even if it did the breakpoints were working at one point on the Vista machine.  Not sure when SP1 was applied although this project was started recently in March\April.  

I do remember moving the solution to a different folder to solve a different problem though.  Not sure if this is significant.

I appreciate your diligence.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 24411962
Too many things, like automatic updates, patches, and service packs can really wreak havoc...

I am certainly not a Vista expert (nor a fan!!)

When you run a solution in the IDE, the Output window shows debugger information when the Debug output is shown.

Example:


Output-Window.png
0
 

Author Comment

by:nod09
ID: 24441515
Here it is
'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Users\Nod\AppData\Local\Microsoft\Windows\Temporary Internet Files\Virtualized\C\Users\Nod\AppData\Local\assembly\dl3\MDZA4RAA.36B\67H59AVZ.HHR\766b4ed3\a02f345e_00d7c901\AntiPhishToolbar.DLL', Symbols loaded.

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\AddinExpress.IE\4.4.127.0__4416dd98f0861965\AddinExpress.IE.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Accessibility\2.0.0.0__b03f5f7f11d50a3a\Accessibility.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Users\Nod\AppData\Local\Microsoft\Windows\Temporary Internet Files\Virtualized\C\Users\Nod\AppData\Local\assembly\dl3\MDZA4RAA.36B\67H59AVZ.HHR\d3ae313e\001993b6_922cc801\Interop.SHDocVw.DLL', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC\Microsoft.mshtml\7.0.3300.0__b03f5f7f11d50a3a\Microsoft.mshtml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Users\Nod\AppData\Local\assembly\dl3\MDZA4RAA.36B\67H59AVZ.HHR\c25664ab\f056545d_00d7c901\Phishing.EXE'

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Data.SqlServerCe\3.5.1.0__89845dcd8080cc91\System.Data.SqlServerCe.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_32\System.Transactions\2.0.0.0__b77a5c561934e089\System.Transactions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.

'iexplore.exe' (Managed): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Debugger.Runtime\9.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Debugger.Runtime.dll'

Open in new window

0
 

Author Comment

by:nod09
ID: 24442135
Ok, I just opened a website stored locally and my breakpoints were hit just fine.  It's just when I'm accessing a site from the web that they're not hit.  Different security zones?
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 24446571
Yes, that is a different security zone:

My Computer = Local
Local Intranet = Internal
Internet = External
0
 

Accepted Solution

by:
nod09 earned 0 total points
ID: 24457818
I set the security for internet zone to the lowest setting medium with no luck.
It looks like it was Internet Explorer protected mode all along because when I turned it off my breakpoints were magically being hit.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Normally the drop down box control found in the .Net framework tools is able to select just one data and value at a time, which is displayed on the text area.   But what if you want to have multiple values to be selected in the drop down box? As …
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now