Real-time Watch/Trace

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ricky W. Hunt

    #1

    Real-time Watch/Trace

    Is there a way to watch a variables value in real-time without running in
    break mode? It seems you should just be able to give VB a list of
    variables/objects that you could see at any time without having to step
    through the program. I guess you could write spawn a second, non-MDI form
    and figure out some way to send updated values to it every time a certain
    value changes. But that would be heck of a lot of work. Does VB have any
    function like this?

    --
    Thanks,
    Ricky W. Hunt
    freendeed


  • One Handed Man \( OHM - Terry Burns \)

    #2
    Re: Real-time Watch/Trace

    U can use debug.writeline/trace statements to dump the variables to the
    output window or a log

    --

    OHM ( Terry Burns )
    . . . One-Handed-Man . . .

    Time flies when you don't know what you're doing

    "Ricky W. Hunt" <rhunt22@hotmai l.com> wrote in message
    news:8VjPc.7613 0$eM2.57946@att bi_s51...[color=blue]
    > Is there a way to watch a variables value in real-time without running in
    > break mode? It seems you should just be able to give VB a list of
    > variables/objects that you could see at any time without having to step
    > through the program. I guess you could write spawn a second, non-MDI form
    > and figure out some way to send updated values to it every time a certain
    > value changes. But that would be heck of a lot of work. Does VB have any
    > function like this?
    >
    > --
    > Thanks,
    > Ricky W. Hunt
    > freendeed
    >
    >[/color]


    Comment

    • Ricky W. Hunt

      #3
      Re: Real-time Watch/Trace

      "One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> wrote in message
      news:OSDtA5FeEH A.556@tk2msftng p13.phx.gbl...[color=blue]
      > U can use debug.writeline/trace statements to dump the variables to the
      > output window or a log[/color]

      Is that a line you put at the beginning of the program and it writes a line
      every time the value changes? Or do you have to put it every place you want
      the value displayed? I want something that say shows a variable and it's
      value and just shows it's current value. For instance, if it was a variable
      it would like watching the seconds on a digital alarm clock. Is there
      nothing like this in VB.NET?


      Comment

      • Charles Law

        #4
        Re: Real-time Watch/Trace

        Hi Ricky

        If you control access to your variable through a property, you would be able
        to add a single Trace statement to the property Set method to write out your
        variable when it changes. You could even leave the Trace statement in your
        production build, and anytime you wanted to see the value change just attach
        the debugger to a running instance of your application.

        HTH

        Charles


        "Ricky W. Hunt" <rhunt22@hotmai l.com> wrote in message
        news:uxmPc.2330 39$Oq2.151171@a ttbi_s52...[color=blue]
        > "One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> wrote in[/color]
        message[color=blue]
        > news:OSDtA5FeEH A.556@tk2msftng p13.phx.gbl...[color=green]
        > > U can use debug.writeline/trace statements to dump the variables to the
        > > output window or a log[/color]
        >
        > Is that a line you put at the beginning of the program and it writes a[/color]
        line[color=blue]
        > every time the value changes? Or do you have to put it every place you[/color]
        want[color=blue]
        > the value displayed? I want something that say shows a variable and it's
        > value and just shows it's current value. For instance, if it was a[/color]
        variable[color=blue]
        > it would like watching the seconds on a digital alarm clock. Is there
        > nothing like this in VB.NET?
        >
        >[/color]


        Comment

        • msnews.microsoft.com

          #5
          Re: Real-time Watch/Trace

          Everyplace u want



          "Ricky W. Hunt" <rhunt22@hotmai l.com> wrote in message
          news:uxmPc.2330 39$Oq2.151171@a ttbi_s52...[color=blue]
          > "One Handed Man ( OHM - Terry Burns )" <news.microsoft .com> wrote in[/color]
          message[color=blue]
          > news:OSDtA5FeEH A.556@tk2msftng p13.phx.gbl...[color=green]
          > > U can use debug.writeline/trace statements to dump the variables to the
          > > output window or a log[/color]
          >
          > Is that a line you put at the beginning of the program and it writes a[/color]
          line[color=blue]
          > every time the value changes? Or do you have to put it every place you[/color]
          want[color=blue]
          > the value displayed? I want something that say shows a variable and it's
          > value and just shows it's current value. For instance, if it was a[/color]
          variable[color=blue]
          > it would like watching the seconds on a digital alarm clock. Is there
          > nothing like this in VB.NET?
          >
          >[/color]


          Comment

          • Ricky W. Hunt

            #6
            Re: Real-time Watch/Trace

            "Charles Law" <blank@nowhere. com> wrote in message
            news:uVWTwBHeEH A.3616@TK2MSFTN GP10.phx.gbl...[color=blue]
            > Hi Ricky
            >
            > If you control access to your variable through a property, you would be[/color]
            able[color=blue]
            > to add a single Trace statement to the property Set method to write out[/color]
            your[color=blue]
            > variable when it changes. You could even leave the Trace statement in your
            > production build, and anytime you wanted to see the value change just[/color]
            attach[color=blue]
            > the debugger to a running instance of your application.
            >
            > HTH[/color]

            Man this sounds like a lot of trouble to go to. Why in the world can't we
            see the Watch window without being in break mode?


            Comment

            • Charles Law

              #7
              Re: Real-time Watch/Trace

              It depends on how you app is designed. If it is not designed using accessor
              methods (properties) then adding them will be more painful. Ordinarily, any
              public member variables should use properties to control access to them.
              That leaves you with private member variables and variables with local
              scope. If they have local scope then you already know when they will change
              their value, i.e when the method is called that declares them.

              So, are these global variables you are trying to observe?

              Incidentally, I am not suggesting that the only way to trace these variables
              is by attaching an external debugger. The Trace statements will execute and
              display the value in the Output window in the IDE.

              But to answer the actual question, I suspect that showing the Watch window
              when not in break mode would add a tremendous computational overhead to the
              application that would slow it down.

              Charles


              "Ricky W. Hunt" <rhunt22@hotmai l.com> wrote in message
              news:8SqPc.2160 03$JR4.86577@at tbi_s54...[color=blue]
              > "Charles Law" <blank@nowhere. com> wrote in message
              > news:uVWTwBHeEH A.3616@TK2MSFTN GP10.phx.gbl...[color=green]
              > > Hi Ricky
              > >
              > > If you control access to your variable through a property, you would be[/color]
              > able[color=green]
              > > to add a single Trace statement to the property Set method to write out[/color]
              > your[color=green]
              > > variable when it changes. You could even leave the Trace statement in[/color][/color]
              your[color=blue][color=green]
              > > production build, and anytime you wanted to see the value change just[/color]
              > attach[color=green]
              > > the debugger to a running instance of your application.
              > >
              > > HTH[/color]
              >
              > Man this sounds like a lot of trouble to go to. Why in the world can't we
              > see the Watch window without being in break mode?
              >
              >[/color]


              Comment

              • Ricky W. Hunt

                #8
                Re: Real-time Watch/Trace

                "Charles Law" <blank@nowhere. com> wrote in message
                news:e6fqVTJeEH A.1652@TK2MSFTN GP09.phx.gbl...[color=blue]
                >
                > But to answer the actual question, I suspect that showing the Watch window
                > when not in break mode would add a tremendous computational overhead to[/color]
                the[color=blue]
                > application that would slow it down.[/color]

                Of course you would have to use common sense and there would be a limit. I
                don't know alot about how the low level stuff works but it seems like it
                shouldn't be too hard for the debug IDE just to keep a watch on certain
                variables and update the display when they change.


                Comment

                • swwiht

                  #9
                  RE: Real-time Watch/Trace

                  Ricky: You are right on. In VB6 it is possible to watch variables in real time. Microsoft and the other people who responded to your post do not understand that Microsoft has made debugging more difficult and time-consuming by neglecting to carry over this feature from VB6.

                  I have an early version of .Net, hopefully they rectified this kludge in the newer versions.

                  From http://www.developmentnow.com/g/38_2...WatchTrace.htm

                  Posted via DevelopmentNow. com Groups
                  DevelopmentNow is an award-winning creative software development agency integrating mobile, web, hardware, mixed reality, and emerging technology.

                  Comment

                  • swwiht

                    #10
                    RE: Real-time Watch/Trace

                    Ricky: You are right on. In VB6 it is possible to watch variables in real time. Microsoft and the other people who responded to your post do not understand that Microsoft has made debugging more difficult and time-consuming by neglecting to carry over this feature from VB6.

                    I have an early version of .Net, hopefully they rectified this kludge in the newer versions.

                    From http://www.developmentnow.com/g/38_2...WatchTrace.htm

                    Posted via DevelopmentNow. com Groups
                    DevelopmentNow is an award-winning creative software development agency integrating mobile, web, hardware, mixed reality, and emerging technology.

                    Comment

                    • swwiht

                      #11
                      RE: Real-time Watch/Trace

                      Ricky: You are right on. In VB6 it is possible to watch variables in real time. Microsoft and the other people who responded to your post do not understand that Microsoft has made debugging more difficult and time-consuming by neglecting to carry over this feature from VB6.

                      I have an early version of .Net, hopefully they rectified this kludge in the newer versions.

                      From http://www.developmentnow.com/g/38_2...WatchTrace.htm

                      Posted via DevelopmentNow. com Groups
                      DevelopmentNow is an award-winning creative software development agency integrating mobile, web, hardware, mixed reality, and emerging technology.

                      Comment

                      • swwiht

                        #12
                        RE: Real-time Watch/Trace

                        Ricky: You are right on. In VB6 it is possible to watch variables in real time. Microsoft and the other people who responded to your post do not understand that Microsoft has made debugging more difficult and time-consuming by neglecting to carry over this feature from VB6.

                        I have an early version of .Net, hopefully they rectified this kludge in the newer versions.

                        From http://www.developmentnow.com/g/38_2...WatchTrace.htm

                        Posted via DevelopmentNow. com Groups
                        DevelopmentNow is an award-winning creative software development agency integrating mobile, web, hardware, mixed reality, and emerging technology.

                        Comment

                        • swwiht

                          #13
                          RE: Real-time Watch/Trace

                          Ricky: You are right on. In VB6 it is possible to watch variables in real time. Microsoft and the other people who responded to your post do not understand that Microsoft has made debugging more difficult and time-consuming by neglecting to carry over this feature from VB6.

                          I have an early version of .Net, hopefully they rectified this kludge in the newer versions.

                          From http://www.developmentnow.com/g/38_2...WatchTrace.htm

                          Posted via DevelopmentNow. com Groups
                          DevelopmentNow is an award-winning creative software development agency integrating mobile, web, hardware, mixed reality, and emerging technology.

                          Comment

                          • swwiht

                            #14
                            RE: Real-time Watch/Trace

                            Ricky: You are right on. In VB6 it is possible to watch variables in real time. Microsoft and the other people who responded to your post do not understand that Microsoft has made debugging more difficult and time-consuming by neglecting to carry over this feature from VB6.

                            I have an early version of .Net, hopefully they rectified this kludge in the newer versions.

                            From http://www.developmentnow.com/g/38_2...WatchTrace.htm

                            Posted via DevelopmentNow. com Groups
                            DevelopmentNow is an award-winning creative software development agency integrating mobile, web, hardware, mixed reality, and emerging technology.

                            Comment

                            • swwiht

                              #15
                              RE: Real-time Watch/Trace

                              Ricky: You are right on. In VB6 it is possible to watch variables in real time. Microsoft and the other people who responded to your post do not understand that Microsoft has made debugging more difficult and time-consuming by neglecting to carry over this feature from VB6.

                              I have an early version of .Net, hopefully they rectified this kludge in the newer versions.

                              From http://www.developmentnow.com/g/38_2...WatchTrace.htm

                              Posted via DevelopmentNow. com Groups
                              DevelopmentNow is an award-winning creative software development agency integrating mobile, web, hardware, mixed reality, and emerging technology.

                              Comment

                              Working...