(solved) Break on Watch Variable change?

Is this possible in defold? Without writing my own custom lua module and registering the variables I want to watch in it?

If not, is it on the roadmap to be added? I’d really like a bit more robust features to help me debug my code other than putting in a ton of print and pprint statements.

Have you tried using the built-in debug tools?

Yes, if you mean put in breakpoints and then look at the variables on the right. The issue is when trying to debug why a collsionobject is or is not firing (based on variable settings) it’s impossible. As the break will occur and stop me from being able to see how they interact.

What I need to do is set a break based on the variable changing that way I can see it change as I’m moving the object. OTherwise if I manually set it…the break will stop the collision and then I can test it.

1 Like

You can right click on a breakpoint and write a Lua expression. If the expression evaluates to true the breakpoint will activate.

5 Likes

Thank you. I think this will work fine.