Simplest way to track a variable?

I want to see what my Direction variable is being set to…
I’ve tried assigning Watches but they don’t seem to change in the debug window.
I’ve tried just doing a print string but it prints too fast to see anything.

Where are you setting your direction variable? Can you share a picture of your blueprints?

Watches do work, but they work per instance of blueprint actor.
So for eg if you are editing player character, you doing it to player character class.
When you run game in editor there is different player character spawned in level.
To see values of that runtime copy of blueprint you need switch to it during runtime.
Either unposses character, or start game while in blueprint editor. There is small drop down list (debug filter) of running instances of blueprint you are editing. Switch from general instance to one that is actually running in game.

Another way is doing simple umg widget that displays that value, visual logger that is in Window menu under developer tools.

You can use Draw Debug String instead of Print String. If you hook up Self object reference to the node’s Test Base Actor pin, the string will display at the actor’s world coordinates automatically with Text Location pin acting as a local offset only.

If you put this in one of your base classes, all instances will show the info in real time during gameplay:

Capture.PNG

2 Likes