|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Debugger questionIs 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! Show quoteHide quote "sh" <sham***@prupipe.com> wrote in message news:vh06h.5800$0r.5401@newsread1.news.pas.earthlink.net... > 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 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 Show quoteHide quote "Dan Bass" <na> wrote in message news:OMB5dR0BHHA.4844@TK2MSFTNGP02.phx.gbl... > 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! > > "sh" <sham***@prupipe.com> wrote in message > news:vh06h.5800$0r.5401@newsread1.news.pas.earthlink.net... >> 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 > > 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 Show quoteHide quote "Steve Long" <Steve_Noneya@NoSpam.com> wrote in message news:OsLLPbNCHHA.1012@TK2MSFTNGP04.phx.gbl... > 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 > > "Dan Bass" <na> wrote in message > news:OMB5dR0BHHA.4844@TK2MSFTNGP02.phx.gbl... >> 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! >> >> "sh" <sham***@prupipe.com> wrote in message >> news:vh06h.5800$0r.5401@newsread1.news.pas.earthlink.net... >>> 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 >> >> > > Right, I just couldn't figure out how to make that happen using the conition
button on the breakpoint properties dialog. S Show quoteHide quote "Dan Bass" <na> wrote in message news:e1ogDwVCHHA.3396@TK2MSFTNGP02.phx.gbl... > 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 > > "Steve Long" <Steve_Noneya@NoSpam.com> wrote in message > news:OsLLPbNCHHA.1012@TK2MSFTNGP04.phx.gbl... >> 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 >> >> "Dan Bass" <na> wrote in message >> news:OMB5dR0BHHA.4844@TK2MSFTNGP02.phx.gbl... >>> 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! >>> >>> "sh" <sham***@prupipe.com> wrote in message >>> news:vh06h.5800$0r.5401@newsread1.news.pas.earthlink.net... >>>> 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 >>> >>> >> >> > >
System.Timers.Timer, thread synchronization issues
Thread.Sleep slowing down the whole application DataGridViewCell has lost its DataGridView - How to solve? Insert COM object that has been separated from its underlying RCW... Creating an array of textbox objects Crystal Reports Logon Problem Don't see application events question about variables and subprocedure Problem calling multiple web services |
|||||||||||||||||||||||