Some debugging tips

My blog has moved.
You can view this post at the following address:
http://www.osherove.com/blog/2003/8/24/some-debugging-tips.html
Published Sunday, August 24, 2003 10:41 AM by RoyOsherove
Filed under:

Comments

Sunday, August 24, 2003 7:51 AM by Jamie Cansdale

# re: Some debugging tips

This certainly opens up some interesting posabilities. I would like to see a set of attributes that act as breakpoint hints. i.e...

[PreCondition("x!=null")]
void method(string x)
{
int length = x.Length;
// blar blar
}

A tool (dare I say it, add-in) could be asked to enable breakpoint hints. It would go through the code and set conditional breakpoints wherever it sees these hint attributes.

The same could be done for method enter, leave, exception style tracing.

Just a thought... ;)
Friday, January 09, 2004 6:19 AM by Trupti

# re: Some debugging tips

Is there a quick way to set a breakpoint at the beginning of every function in a particular file? (i.e. do it with a single command instead of manually setting a breakpoint in every function).

Any help will be appreciated...
Friday, January 09, 2004 6:49 AM by Roy Osherove

# re: Some debugging tips

I think doing a macro is your only choice.
look at some of the sample macros provided with vs.net. I know there is one there that clear all breakpoints. perhaps you can do the opposite..