How to debug rare bugs that occur only occasionally?

Hi,

I am working on a game, and There are some cases where a wierd bug will happen, but it’s not very consistent, or because RNG, replicating the event and the circumstances is just not possible.

For example, I got an bug where my character pawn collided with a bouncy object. And instead of bouncing up and forwards, it bounce upwards but backwards slowed. This hasn’t happened in my time working on this game which is since February. I think it could be beacuse of some collisions between meshes, but I can’t be sure.

Is it possible to check the event stack that where fired when play in editor occurred? Or some kind of output log that will tell me more explicitly what happened?

How do you approach investigating this rare cases, where replicating the bug is just not possible, because I don’t the values of the actors interacting (Position, velocity, bool variables, etc.)

Thanks

I assume you mean blueprint, you use breakpoints which is quite common way of debugging., when you want to check up state of things in specific iccurence oyu place breakpoint on line of code (in case of blueprint is a node) when breakpoint is reached program execution is stoped and turn in to debug mode, which you can see current state of varables, from that mode you can check also check values on the pins and execute code manually step by step allowing to you to check how logical flow of blueprint goes and if goes correctly as you expected. Call stack is also avable, which in rencet updates also provides calls in native code.

https://docs.unrealengine.com/en-us/Engine/Blueprints/UserGuide/Debugging

Output Log is avable in Window->Devlopment Tools->Output Log, it is also outputed in to file in Saved/Logs directoryu of your project

Breakpoints are useless, because the code works all the time. Just one weird instance it failed to behave as i expected.

The output log doesn’t say anything. Only some variable print to log messages that I made. Those debugging tools you linked are for when you break the execution mid play.