What happens to the output of the Print function?

What does print() do on a published app?
I can’t see it in the debugger (though I must confess to not looking very hard).

Excellent question. You’ll want to check out the App Logs:

image

There you’ll find all the console output of your app, from both server and client, grouped by session. You can filter to hide debug sessions, and choose whether to display only those sessions where errors occurred. You can also search.

Hope that helps!

Thanks Ian - but I worded my question badly (too much red wine).

What I should have said was - can I leave my print statements in as debug on a published app without the end user seeing them? ie is the only place they can be seen in the app logs and not in the browser?

Console output from both client and server is always sent to the browser, although a user of a published app would have to open the JavaScript console to see it. An exception to this is HTTP endpoints, where print output is only recorded in the App Logs and not sent anywhere.

If you wish to log sensitive data, I’d recommend doing so using a Data Table with no client-side access.

2 Likes

Thanks, Ian. I couldn’t see it but I was being a donkey. I can see it now.