Link to home
Start Free TrialLog in
Avatar of Sperling1
Sperling1

asked on

How to disable steping into an assembly's source code or seeing "disassembly"

It often happens that one uses an assembly, such as from a 3rd party, where even though you press F11 when over a call to a method from that assembly, Visual Studio just jumps right over that call without trying to jump into that assembly's source.  Somehow VS recognizes that the source code isn't available, or never was available, and this is the preferred action.  

You may say: why not just press F10 / i.e. jump over rather into that call, but often, one line of code will have multiple calls, one of which you WANT to jump into (such as a method in your main project), mixed with calls to dlls that you do NOT want to jump into.  Note that the .NET framework is itself just assemblies.  So often, a call to a method in your project will for instance have as an argument (a parameter) string.Format("", ...).  You of course do not want to jump into the .NET source code of the method Format, and fortunately this doesn't happen.

But the problem is, often when I've made my own assemblies, and use them on the same machine, I cannot figure out how to tell VS I do NOT want to jump into the source code (which is available on the same machine) for this referenced assembly.  Often calls to this external assembly are made within the same line as a call to a method I need to jump into within the same project.  I have tried everything under the sun to get this to work, it seems nearly impossible!  My first step was to delete the pdb file -- but at every rebuild, the stinking project adds the pdb back.  Rename the directory where the source files are -- this quits the pdb file from reappearing in your project for that assembly, but somehow, VS still tries to jump into the source, asking you for the location, or forcing you to view the disassembly, or: stop the program ... no other options!  

I've tried to change every setting possible within Tools>Options>Debugging.  I've tried many other things.  Almost all posts I've seen on this issue has to do with the opposite concern: when someone *wants* to step into the source of an assembly but, for instance, can't locate it.  I've found no one else through google searches, etc, asking this question (which surprises me).

Comments Please!

Thanks

ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Sperling1
Sperling1

ASKER

Now that is quite interesting.  I really appreciate you sharing that kaufmed.  Upon checking it out, it really does not look like it could work though.  It would take tremendous effort to flag every method in the assembly, etc.  But I hadn't thought about a more programmatic solution, more might be found along those lines ... maybe setting a setting within System.Diagnostics could produce the desired result (a totally different route I will note from checking boxes in the VStudio IDE, or messing with Assembly settings)...

Thanks again, still looking.
Was not answered, but I appreciate the idea, and no one else is answering.