Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-05-14
16
Medium Priority
?
2,367 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 

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
 

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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

705 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