Turning on WP_DEBUG and leaving it at that is a bad habit. Visitors then see your warnings, file paths included.
There are three constants that belong together. WP_DEBUG switches debugging on. WP_DEBUG_LOG writes the messages to a file. WP_DEBUG_DISPLAY decides whether they also show up on the page, and its default is yes.
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Now errors go to wp-content/debug.log and the page stays clean. The docs also show that WP_DEBUG_LOG accepts a path, such as /tmp/wp-errors.log. I like that, because a log outside the web root cannot be fetched by a stranger. Watch it with tail -f.
This pays off most for things that do not render on the page: AJAX calls and scheduled tasks. An error there would be invisible without the log.
The caveats. The docs do not recommend debug mode on live sites at all, so switch it off again when you are done. And these constants are only honoured when WP_DEBUG itself is true. If you leave the log on the default path, remember that it sits inside the web root and the file can grow without limit.
Further reading: Debugging in WordPress (developer docs), Editing wp-config.php (WordPress developer docs), On this site: WP_AUTO_UPDATE_CORE decides which WordPress updates install themselves, On this site: set WP_ENVIRONMENT_TYPE so plugins know a site is staging, On this site: Guide: fix your WordPress file permissions without breaking the site