print()ed output from your apps is captured in the Anvil App Logs. Every session starts a new entry in the logs, and Exceptions are also recorded here.
You can find your App Logs in the Gear Menu:
Output from the client and server is visually distinct - server output has a yellow background, just like in the Output Panel. And just like in the Output Panel, you can click Exception tracebacks to jump to the place in the code where the error occurred:
Debug sessions are marked so you can tell whether a session was initiated by you, in the Anvil Editor, or by someone visiting your app for real.