473,385 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
Nov 20 '05 #1
16 2234
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" <rh*****@hotmail.com> wrote in message
news:8VjPc.76130$eM2.57946@attbi_s51...
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

Nov 20 '05 #2
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message
news:OS*************@tk2msftngp13.phx.gbl...
U can use debug.writeline/trace statements to dump the variables to the
output window or a log


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?
Nov 20 '05 #3
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" <rh*****@hotmail.com> wrote in message
news:uxmPc.233039$Oq2.151171@attbi_s52...
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message news:OS*************@tk2msftngp13.phx.gbl...
U can use debug.writeline/trace statements to dump the variables to the
output window or a log
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?

Nov 20 '05 #4
Everyplace u want

"Ricky W. Hunt" <rh*****@hotmail.com> wrote in message
news:uxmPc.233039$Oq2.151171@attbi_s52...
"One Handed Man ( OHM - Terry Burns )" <news.microsoft.com> wrote in message news:OS*************@tk2msftngp13.phx.gbl...
U can use debug.writeline/trace statements to dump the variables to the
output window or a log
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?

Nov 20 '05 #5
"Charles Law" <bl***@nowhere.com> wrote in message
news:uV**************@TK2MSFTNGP10.phx.gbl...
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


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?
Nov 20 '05 #6
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" <rh*****@hotmail.com> wrote in message
news:8SqPc.216003$JR4.86577@attbi_s54...
"Charles Law" <bl***@nowhere.com> wrote in message
news:uV**************@TK2MSFTNGP10.phx.gbl...
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


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?

Nov 20 '05 #7
"Charles Law" <bl***@nowhere.com> wrote in message
news:e6**************@TK2MSFTNGP09.phx.gbl...

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.


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.
Nov 20 '05 #8
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
http://www.developmentnow.com
Jan 1 '07 #9
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
http://www.developmentnow.com
Jan 1 '07 #10
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
http://www.developmentnow.com
Jan 1 '07 #11
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
http://www.developmentnow.com
Jan 1 '07 #12
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
http://www.developmentnow.com
Jan 1 '07 #13
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
http://www.developmentnow.com
Jan 1 '07 #14
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
http://www.developmentnow.com
Jan 1 '07 #15
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
http://www.developmentnow.com
Jan 1 '07 #16
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
http://www.developmentnow.com
Jan 1 '07 #17

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Aaron W. West | last post by:
Timings... sometimes there are almost too many ways to do the same thing. The only significant findings I see from all the below timings is: 1) Integer math is generally fastest, naturally....
2
by: cwdjr | last post by:
Real One has a page to copy on their site that detects if the browser of a viewer of a page has Real One installed. The page is located at...
4
by: Allan Adler | last post by:
I'm trying to reinstall RedHat 7.1 Linux on a PC that was disabled when I tried to upgrade from RH7.1 to RH9. This is presenting lots of unexpected difficulties. Apart from wanting to keep the old...
10
by: Pavils Jurjans | last post by:
Hallo, It is know issue that due to the fact that computer has to store the real numbers in limited set of bytes, thus causing a minor imprecision from the decimal value that likely was stored....
17
by: David Scemama | last post by:
Hi, I'm writing a program using VB.NET that needs to communicate with a DOS Pascal program than cannot be modified. The communication channel is through some file databases, and I have a huge...
5
by: Henry Wu | last post by:
Hi, now that in .NET everything is on millimeter, I was wondering how can one convert Pixel to Millimeter and any user's screen/monitor. I saw the following code on how to convert pixel to...
0
by: support | last post by:
Veteran Real Estate Investor Shares some of his best Insider Secrets for successful investments! www.RealEstateBeginners.ws Have you ever wondered about investing in real estate? Maybe one...
12
by: Raymond Hettinger | last post by:
I am evaluating a request for an alternate version of itertools.izip() that has a None fill-in feature like the built-in map function: >>> map(None, 'abc', '12345') # demonstrate map's None...
16
by: DirtyHarry | last post by:
Good day everyone. This sounds like a stupid question, but I became just curious yesterday, and I looked up several textbooks. However, no textbooks on computer language (that I have ) mentioned...
2
by: Tim | last post by:
Folks, Can anyone thow some clarifying light on the following? I have come across a column with the same name and same data contents defined on different tables, on some the column is defined...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.