Debugger question

  • Thread starter Thread starter sh
  • Start date Start date
S

sh

Is there a way to set a condition in the debugger, so that the program
will enter the debugger when the condition is true?

In my program, the number of rows in my grid is going down to 0 at some
point, but I can't find what subroutine/function is causing it to
happen. I can't trace the program line by line. I would like to let the
debugger tell me when it happens.

Is there a way to enter a command into a watch window, such as
Grid.Rows.Count=0, and it will enter the debugger when the condition
becomes true?

Thanks
 
In VS2005 - if you create a break point, then right click on the red circle
there's a couple of options there for conditions, counters etc...

I can't remember about VS2003 as I've not got it installed on my machine
anymore!
 
Yes, you can also do this in VS 2003. However, I am finding it difficult to
set a condition such that:
obj Is Nothing.
as the Breakpoint Properties window places single quotes around the
condition. To get to the Breakpoint Properties window, right click on the
breakpoint and click Breakpoint Properties, then click the Condition button.

Is there a way to tell it to break when and object is nothing?

Steve
 
Presumably for debugging purposes, you could write a simple if object is
nothing type test, which contained something like dim i as int = 1... and
put the breakpoint here? =oD
 
Right, I just couldn't figure out how to make that happen using the conition
button on the breakpoint properties dialog.

S
 
Back
Top