Xojo IDE

Is any way to do like watch var value on the debugger

The Debugger does not have a “watch” feature. However you can simulate it in code by using the Break command:

If value = 10 Then Break // Displays the debugger End If

Ok
But I have a global var and like to see the value like the watch in vb or how I can send the value to console or log

[quote=123216:@Paul Lefebvre]The Debugger does not have a “watch” feature. However you can simulate it in code by using the Break command:

If value = 10 Then Break // Displays the debugger End If[/quote]

Your code simulates a “conditional breakpoint” not a “watch”.

Heh. You are right. Too early for me, I guess! Hopefully, it’s still a useful tip!

Ok

This should help

http://documentation.xojo.com/index.php/System.DebugLog

Thanks

What about this ?

system.DebugLog sExample

Debuglog

A hack that is useful: select your global variable, and convert it to a Computed Property. Then you can set a breakpoint in the Getter or Setter or both - this is nice, since you can catch not only when it’s being written, but when it’s being Read, too.

The reality with watch points is that, once we get to that kind of feature, there is a limited number you can do in hardware which is the only way to do it without some enormous performance hit when debugging
GDB mentions this in their docs https://sourceware.org/gdb/current/onlinedocs/gdb/Set-Watchpoints.html
Depending on your system, watchpoints may be implemented in software or hardware. GDB does software watchpointing by single-stepping your program and testing the variable’s value each time, which is hundreds of times slower than normal execution. (But this may still be worth it, to catch errors where you have no clue what part of your program is the culprit.)

The number of hardware watchpoints you can set on an intel CPU is low - 4

When working in Windows I am still using the good old DebugView tool. It’s free.
DebugView

The Xojo IDE has this built in - check the messages icon at the bottom.

Yes, that’s true Wayne, but when it comes to filtering, copy-paste etc. DebugView is much easier and even faster in usage.