You can log console messages in your backend code

If you are logging in the backend, it will be displayed in the Editor’s Developers Console due to some crazy magic by the Corvid developers. However, when running a Live site, the backend messages won’t appear in the browser’s console. See the doc section Backend Code & HTTP Functions where it states:
Because of security concerns, messages in backend code are not logged to the browser’s console on the published version of your site.

You can also use the Site Monitoring feature, to let you debug your published backend code. Site Monitoring is much more powerful and robust, and secure.