tags:

views:

67

answers:

2

If I have a an app which relies on a .dll which contains my core classes. I have noticed when debugging the main app and it steps into the .dll, the debugger steps through (At my request) blank lines!? Why is this?

Sometimes when I debug an asp.net app and get a ysod, I don't get the name of the file with the bug or line numbers, but I get the ASP.NET/.NET Framework versions. Why is this?

BTW, I made a previous thread about a ysod occuring but after the last line executes in the step through (I put a breakpoint on), the YSOD happens - so I can't find the line by stepping through. This is/was because the faulty code was in a project reference.

Thanks

+4  A: 

There's a good chance that the version of the DLL that you are referencing is out of sync with the source code.

Does this happen when the DLL is part of your solution and you are referencing it with a project reference?

Eric J.
That won't cause the debugger to get the lines wrong. The lines of code matched up with the compiled assembly is in the debug file, not the dll itself.
David Stratton
Or if I'm wrong, please explain it to me.
David Stratton
I've had that happen on occasion. When I've got breakpoints set that jump a line (to a blank, for example), that's the first indication that I forgot to update the DLL I am referencing to match the source code I'm viewing.
Michael Todd
Yeah it's a project reference (see my edit). I'll rebuild and add the .dll again.
dotnetdev
+2  A: 

As far as stepping through blank lines, it sounds like the debug symbols file (*.pdb) for the dll isn't being updated.

That could also cause the second symptom you mention as well.

Edit - added

Please check out this article for the reasoning behind my answer:

http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/05/11/pdb-files-what-every-developer-must-know.aspx

David Stratton
I have one big project that I added my own delete script to the build process just to keep the *.pdb updated.
NitroxDM
I actually read that a few weeks ago. Good link though. See my edit.
dotnetdev