Is it possible to set a breakpoint on a specific variable when it changes the value?
Thanks.
Saso
Setting a breakpoint if variable changes?
Re: Setting a breakpoint if variable changes?
Yes,
For example:
- Start debugger with 'CallDeugger'
- Goto menu Debugger and add 'Data Breakpoints'
--- Condition: var <> 0
- Continue
For example:
- Start debugger with 'CallDeugger'
- Goto menu Debugger and add 'Data Breakpoints'
--- Condition: var <> 0
- Continue
Code: Select all
Global i, var
CallDebugger
For i = 1 To 100
If i = 10
var = 1
EndIf
Next
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Setting a breakpoint if variable changes?

I've been using PureBasic since 2004, but I saw this feature for the first time today.
Good to know, thanks.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: Setting a breakpoint if variable changes?
Another fantastic debugging feature is the Watchlist. This is a window that shows real-time updates of any variables that you nominate, so you can see them as they change without needing to use the Debug() command everywhere.
Re: Setting a breakpoint if variable changes?
Thanks. I will try the 'call debug'.
Saso
Saso
Re: Setting a breakpoint if variable changes?
I've been using Purbasic since 2005. I've seen it for a while, but I tried it for the first time.STARGÅTE wrote: Sun Oct 09, 2022 6:08 pm![]()
I've been using PureBasic since 2004, but I saw this feature for the first time today.
Good to know, thanks.

My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Setting a breakpoint if variable changes?
I use Watchlist all the time. But in my case I would have to press F8/F11... to many times because I am not sure when change happens.BarryG wrote: Sun Oct 09, 2022 10:22 pm Another fantastic debugging feature is the Watchlist. This is a window that shows real-time updates of any variables that you nominate, so you can see them as they change without needing to use the Debug() command everywhere.
Thanks.
Saso