Debugging - Want to Skip Code

P

Paul

I am running VB.NET 2005. I have a multi-project solution. One
project contains all my base classes and user-controls. My other
project is my application that uses the base classes and UCs. I want
to debug parts of the base and all of my application code. But there
are parts of the base code that I just want to skip and not see (EVER)
when debugging. Is there some feature like #DEBUG that does this?
 
O

\(O\)enone

Paul said:
I want
to debug parts of the base and all of my application code. But there
are parts of the base code that I just want to skip and not see (EVER)
when debugging. Is there some feature like #DEBUG that does this?

If you can limit your requirement to entire procedures, you can achieve this
by applying the <DebuggerStepThrough()> attribute to the procedures in
question. Any procedures set up with this attribute will be effectively
ignored by the debugger in the IDE (although they will of course be called
and executed as normal); "step into" will treat them as if they were
language statements and will step over them, breakpoints set inside them
will be ignored, etc.

If you want to be able to do this for specific blocks of code within a
larger procedure, I'm not aware of any way to achieve this.

HTH,
 
P

Paul

(O)enone, thank you very much! That was a quick answer and exactly
what I needed.

Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top