How to avoid stepping into the Enterprise Library when debugging?

Hi,

<<<< Note: I first posted this in the "VB General" forum, but decided it is more appropriate here. Please help! >>>>

I'm sure this is an easy question to answer for someone that has a better understanding about how debugging works in Visual Studio (2005).

I've been trying to figure out how to avoid stepping into the DAAB (Enterprise Library Data Access Application Block) when debugging. I have "Just my code" enabled, and I am referencing the compiled versions of the DLLs (i.e. I don't have the DAAB source added to my solution), yet somehow it still steps into the DAAB when I am pressing F8 to step through the code. Of course, I can hit Shift-F8 at the appropriate times to step over those lines instead of stepping into them, but I would like to just disable stepping into the DAAB altogether. How is Visual Studio aware of the DAAB source files (e.g. DatabaseFactory.cs, Database.cs) when I have referenced the compiled DLLs and not the DAAB project By the way, it probably doesn't make a difference, but I am using the January 2006 version of the Ent Library.

Thanks!
Nate
------------------------------------

Nate,

You may check on this two things:

1. verify DAAB Symbols are not loaded in your project. Go to Tools -> Options -> Show all Settings-> Debugging -> Symbols-> Verify DAAB symbols location is not include

2. Verify Source Server Support is not enabled. Go tools -> Options -> Show all Settings -> Debugging -> uncheck 'Enable source Server support'

--Jack

--------------------------------------

Jack,

Hi and thanks for your reply.

I checked and Source Server Support is not checked.

The only symbols location I had setup was http://msdl.microsoft.com/download/symbols,
downloading to the C:\websymbols directory. I deleted this symbol location from the options dialog. I also physically deleted the c:\websymbols directory. I then closed the IDE and reopened it. Unfortunately, that did not help. It still steps into the DAAB source!

Thanks so much for taking the time to document your suggestions though. Are there any other ideas

Thanks!
Nate


Answer this question

How to avoid stepping into the Enterprise Library when debugging?

  • F. Gsell

    Hi Nate,

    Can you see frames in your Call Stack window that are not your code This is toggled by right-clicking and checking or unchecking "Show External Code" on the Call Stack window. When external code is disabled, something like [External Code] shows up in place of actual call stack frames. If External Code is enabled in your call stack, it might cause this kind of behavior.

    Other than that, it's not apparent what might be the problem, assuming Just My Code is, in fact, enabled.

    One easy work-around is to use F10 to Step Over when you're debugging over calls to this assembly, rather than to Step In, but I realize this is a matter of remembering to do it at the right times, etc.


  • Sniper167

    Thanks for your reply. I right clicked on the call stack at runtime and the external code checkbox is not checked. So I'm still not sure what is going on. Thanks for trying though. I did notice that it had some symbols loaded for the DAAB. However, I don't have any specific symbol locations specified in my debug options. Is there some hidden symbol cache somewhere that I can delete

    Thanks,
    Nate

  • Kinlan

    One thing that helps is disabling breaking on SqlClient exceptions. (On the exceptions screen, which you can access by hitting Ctrl-Alt-E in the IDE; uncheck thrown, but keep user handled checked). The problem is that I WANT to throw the error while debugging, but I want it to break at the spot in MY code, not THEIR code.

    Arggh, please help!

  • magicalclick

    I figured out a workaround. Rename the sourcecode directory in ProgramFiles\Ent Library to src_renamed or something. You have to close Visual Studio before you can rename the directory, but after you reopen then next time the code hits an error in their code it will break in your code. Yeahh!!

  • How to avoid stepping into the Enterprise Library when debugging?