Can you use Print String to print debug messages in VR?

I’m currently working on debugging issues in a VR project, using the “VR Preview” option a lot. I just ran into an issue that would be easy to solve with Print String in regular PIE previews, but the mesages don’t seem to be printing to the screens in the HMD nor are they printing to the output log. I’ve tried adding Print String nodes in places that definitely get executed (e.g. as the first node after EventBeginPlay), and all of the messages print regularly when I do PIE. Is there any way to get these messages to print somewhere (anywhere) when doing a VR Preview, and if not, what are the best/quickest workarounds you use?

Have you tried “Stack Trace” ? I’ve always found it to be pretty convenient.

It’s strange that your print calls aren’t being executed though. It sounds as if your blueprint isn’t being called. Can you elaborate more on precisely which classes you are placing the calls in? Are you overriding the game mode (remember there’s a per world override) with your own class and setting the pawn there? Or are you placing the pawn in the world and having it auto possess the player?

Stack trace does print to the log. Apologies for the mistake on my part, but it appears the messages have been printing to the log from the start, there were just so many other messages coming from different scripts simultaneously that I couldn’t find them. I changed the text of the message, and it was easier to search.

Since this question was posted in error, I suppose I’ll delete it.

So I was having the same issue (debug print not showing in VIVE, and prefer so see the message on-screen instead of having to sift through the logs).

The reason is that the lines are printed “out of sight” for both the HMD and the preview on-screen.

A simple workaround is to make a loop to print some random lines before you print your actual message (see screenshot). The magic number seems to be 28(!) lines.

So I was having the same issue (debug print not showing in VIVE, and prefer so see the message on-screen instead of having to sift through the logs).

The reason is that the lines are printed “out of sight” for both the HMD and the preview on-screen.

A simple workaround is to make a loop to print some random lines before you print your actual message (see screenshot). The magic number seems to be 28(!) lines.

219388-printloop.jpg

1 Like

Print string works best with event tick, atleast for me.