# How to debug custom scripts?

**URL:** <https://community.auth0.com/t/how-to-debug-custom-scripts/7018>\
**Category:** Get Help\
**Tags:** rules, debug\
**Created:** [June 12, 2017, 6:55am UTC](https://community.auth0.com/t/how-to-debug-custom-scripts/7018 "2017-06-12T06:55:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kusanagi2k2](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@kusanagi2k2](https://community.auth0.com/u/kusanagi2k2)\
**Post date:** [June 12, 2017, 6:55am UTC](https://community.auth0.com/t/how-to-debug-custom-scripts/7018/1 "2017-06-12T06:55:50Z")

</div>

I followed the instructions to debug my scripts but when I do a test I get this result:

```
[23:48:43.184Z] INFO wt: new webtask request 1497224924965.281899
[23:48:43.216Z] INFO wt: { [Error: Cannot find module '../build/Release/bson'] code: 'MODULE_NOT_FOUND' }
[23:48:43.216Z] INFO wt: js-bson: Failed to load c++ bson extension, using pure JS version
[23:48:45.122Z] INFO wt: finished webtask request 1497224924965.281899 with HTTP 200 in 1927ms

```

I am using Windows 10

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [June 12, 2017, 7:13pm UTC](https://community.auth0.com/t/how-to-debug-custom-scripts/7018/2 "2017-06-12T19:13:15Z")

</div>

Technically the information you posted means you’re already debugging your scripts (rules, custom databases, etc).

More specifically those are the logs coming from your scripts and which would allow you to troubleshoot them by, for example, including `console.log` statement that would also appear in those logs.

Based on the error message, you’re using scripts that leverage the default way to connect to Mongo which uses a package that outputs the two middle messages you posted. The messages are only informational messages that indicate that the C++ version of the `js-bson` file was not found and as such it’s using the Javascript based version.

---

<div class="post-metadata">

**Author:** ![kusanagi2k2](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@kusanagi2k2](https://community.auth0.com/u/kusanagi2k2)\
**Post date:** [June 12, 2017, 10:58pm UTC](https://community.auth0.com/t/how-to-debug-custom-scripts/7018/3 "2017-06-12T22:58:56Z")

</div>

ok thank you!

---

<div class="post-metadata">

**Author:** ![kusanagi2k2](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@kusanagi2k2](https://community.auth0.com/u/kusanagi2k2)\
**Post date:** [June 12, 2017, 10:58pm UTC](https://community.auth0.com/t/how-to-debug-custom-scripts/7018/4 "2017-06-12T22:58:56Z")

</div>

ok thank you!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 2, 2018, 5:54am UTC](https://community.auth0.com/t/how-to-debug-custom-scripts/7018/5 "2018-03-02T05:54:34Z")

</div>


