While executing new functions in WordPress, we face different types of problems and warning signs numerous times. Most of the time, it is very hard to trace the error messages and address every bugs.In order to find a solution to these, we need to use a debugger.
Luckily, WordPress comes with a default debugger system titled ‘WP_DEBUG.’ WordPress codex defines this feature as a PHP constant which can turn on the debug mode for the platform. You can learn more  here .

While enabling WP_DEBUG is important in development, you may have some non-fatal errors and warnings that you can’t avoid for whatever reason that you don’t want to displayed to all of your visitors. Also, there may be errors and warning that you are not aware of as you never triggered them, but your site’s visitors are seeing. For these reasons it’s important to keep in mind that WP_DEBUG should not be used on a live site.

While it’s a useful feature during development, it can be dangerous on a live site because text in the PHP notices can reveal details about your code, paths and other information to visitors to your site. Evil minded people could take advantage of these things and try to hack your website.