Wish New log function, LogWatch (or, a way to have data in the watch view updated at runtime)

ema01

Member
Licensed User
Longtime User
hi,
i thought this could be a nice feature to have.
We have the watch window where we can explore the content of an object when a breakpoint is hit
We have the log window where we can log data in real time, but the view scroll with each new log

however, we miss some sort of real time watch and it could be really useful to have
The idea is simple: It would work mostly like a log (you pass the function the "name" of the variable/parameter/stuff and the string containing the data to be displayed) but then it stays at a fixed position.. something like

LogWatch("voltage","5.0V")
will add a line in the watch view, titled voltage and displaying 5.0V

LogWatch("voltage","2.5V")
since voltage is already present, update the content of voltage to 2.5V

I usually have a number of logs going on from different tasks, it gets tideous to keep track of everything
 

AnandGupta

Expert
Licensed User
Longtime User
I use LogColor() to differentiate values coming from different sections, subs etc.
 

ema01

Member
Licensed User
Longtime User
I use LogColor() to differentiate values coming from different sections, subs etc.

Who doesn't?
But say you have several logs per second and you want to monitor variables there as well. Wouldn't it be extremely awesome to have the variable to monitor at a fixed place?
 

AnandGupta

Expert
Licensed User
Longtime User
But say you have several logs per second and you want to monitor variables there as well. Wouldn't it be extremely awesome to have the variable to monitor at a fixed place?
Yes I agree. Watching a fixed place is much easier than a scrolling pane.
 

Sandman

Expert
Licensed User
Longtime User
I imagine it would be possible to whip up a B4J app to help show values like that, while at the same time get the full, live, scrolling log in the IDE. Without anything needs to change in the IDE. Take a look at this post:

It shouldn't be overly difficult to make a B4J app that listens to the udp messages and adds/updates a watch when we log using a standard format, perhaps something like this:
B4X:
Log("watch@voltage:5.0V")
 
Top