Reputation: 15807
I have added a reference to a DLL from another project (contained in the bin
folder) and I have set Copy local to true
. When I step through the code; the debugger jumps all over the place. I believe this is because the code is optimised. I have two questions:
Upvotes: 1
Views: 470
Reputation: 34846
My guess is the jumping is due to the PDB (symbols) being out of sync with the compiled DLL, thus the symbols tell VS to go to a line number that does not actually match up with what the code is actually doing; optimization may also play a part as well, because of in-lining functions.
Other things that influence the debugging experience are:
DebuggerNonUserCode
attributeUpvotes: 1
Reputation: 85655
Debugging optimized code may "jump around", as some functions become inlined. The most telling thing is that local variables usually get optimized away, giving a message to that effect when trying to read them.
If the jumping seems to make very little sense, though, then it's more likely you have the wrong PDB (which maps to line numbers) or source (which has the line numbers).
Upvotes: 0