# Backend Debugging

**URL:** <https://forum.wixstudio.com/t/backend-debugging/18218>\
**Category:** Ask the community\
**Tags:** question, wix-members-area, code\
**Created:** [June 10, 2019, 1:31am UTC](https://forum.wixstudio.com/t/backend-debugging/18218 "2019-06-10T01:31:06Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![\_luke](https://avatars.discourse-cdn.com/v4/letter/_/51bf81/32.png) [@\_luke](https://forum.wixstudio.com/u/_luke)\
**Post date:** [June 10, 2019, 1:31am UTC](https://forum.wixstudio.com/t/backend-debugging/18218/1 "2019-06-10T01:31:06Z")

</div>

Any plans for better debugging for backend code on a published site? Used to be able to console.log but looks like that has changed for security reasons.

Can insert code into a collection to read it but its a fairly cumbersome solution.

Mainly asking because once we’re using Users/Members the preview function becomes pretty useless, so we have to test in the published site.

---

<div class="post-metadata">

**Author:** ![yisrael-wix](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/yisrael-wix/32/1107_2.png) [@yisrael-wix](https://forum.wixstudio.com/u/yisrael-wix)\
**Post date:** [June 10, 2019, 7:04am UTC](https://forum.wixstudio.com/t/backend-debugging/18218/2 "2019-06-10T07:04:53Z")

</div>

You can use the [Site Monitoring feature](https://support.wix.com/en/corvid-by-wix/site-monitoring) . See the [site-monitoring](https://www.wix.com/corvid/reference/site-monitoring.html) API for additional details.

Another simple option is to “write” debug statements to a database collection as a homemade console log. You can then view the db collection to inspect the “log”.

---

<div class="post-metadata">

**Author:** ![\_luke](https://avatars.discourse-cdn.com/v4/letter/_/51bf81/32.png) [@\_luke](https://forum.wixstudio.com/u/_luke)\
**Post date:** [June 10, 2019, 7:53am UTC](https://forum.wixstudio.com/t/backend-debugging/18218/3 "2019-06-10T07:53:47Z")

</div>

Cheers will have a look

---

<div class="post-metadata">

**Author:** ![experimentnoxx](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/experimentnoxx/32/10304_2.png) [@experimentnoxx](https://forum.wixstudio.com/u/experimentnoxx)\
**Post date:** [June 27, 2019, 8:27pm UTC](https://forum.wixstudio.com/t/backend-debugging/18218/4 "2019-06-27T20:27:27Z")

</div>

@yisrael-wix should Site monitoring work with backend console.log, or is there another way? You seem to imply it should work, but I don’t see it, as @Luke says

---

<div class="post-metadata">

**Author:** ![ohad-laufer](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/ohad-laufer/32/669_2.png) [@ohad-laufer](https://forum.wixstudio.com/u/ohad-laufer)\
**Post date:** [June 27, 2019, 9:52pm UTC](https://forum.wixstudio.com/t/backend-debugging/18218/5 "2019-06-27T21:52:47Z")

</div>

see here: [https://support.wix.com/en/article/corvid-about-site-monitoring](https://support.wix.com/en/article/corvid-about-site-monitoring)  
console.info() should appear in the site monitoring

---

<div class="post-metadata">

**Author:** ![Ventura](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/ventura/32/81284_2.png) [@Ventura](https://forum.wixstudio.com/u/Ventura)\
**Post date:** [March 28, 2020, 8:47pm UTC](https://forum.wixstudio.com/t/backend-debugging/18218/6 "2020-03-28T20:47:35Z")

</div>

For those who don’t like to read that much.

You can console.log() your backend extremely easy.

Go to your Wix dashboard - settings - site monitoring.

There click the “OPEN” button. Once this is ready.

Using your live site run it, run from your frontend a promise that calls for a backend function, if the backend function contains a CONSOLE.LOG() this console will be displayed in the **site monitoring as a JSON object.**

this is site monitoring on action:

 ![](https://us1.discourse-cdn.com/wix/original/3X/8/8/88013cfc1b0532c0332a5f1fdf8a229b2bfe5c8e.png)

Then click on any of the logs:

 ![](https://us1.discourse-cdn.com/wix/original/3X/1/6/16441c9676b65dd7b7c2e52423d02506e0658270.png)

The jsonPayload contains always your console.log() from the backend.

And then keep in mind ALWAYS this message comes in an array, your console.log() is everything but the array.

In this case “controller has been called from not submit” is a string that I wrote in my console.log(); method.

---

<div class="post-metadata">

**Author:** ![givemeawhisky](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/givemeawhisky/32/5383_2.png) [@givemeawhisky](https://forum.wixstudio.com/u/givemeawhisky)\
**Post date:** [March 28, 2020, 10:50pm UTC](https://forum.wixstudio.com/t/backend-debugging/18218/7 "2020-03-28T22:50:53Z")

</div>

This is already well documented in the Wix Support page, as shown in your duplicate post here.  
[https://www.wix.com/corvid/forum/community-discussion/console-log-directly-from-the-backend](https://www.wix.com/corvid/forum/community-discussion/console-log-directly-from-the-backend)

---

<div class="post-metadata">

**Author:** ![givemeawhisky](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/givemeawhisky/32/5383_2.png) [@givemeawhisky](https://forum.wixstudio.com/u/givemeawhisky)\
**Post date:** [March 28, 2020, 10:54pm UTC](https://forum.wixstudio.com/t/backend-debugging/18218/8 "2020-03-28T22:54:31Z")

</div>

And exactly like Yisrael and Ohad have already posted the links to above, it is also shown in its own support pages here.  
[https://support.wix.com/en/article/corvid-about-site-monitoring](https://support.wix.com/en/article/corvid-about-site-monitoring)  
[https://www.wix.com/corvid/reference/site-monitoring.html](https://www.wix.com/corvid/reference/site-monitoring.html)
