Auth0 Home Blog Docs

How to debug custom scripts?

rules
debug

#1

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


#2

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.


#3

ok thank you!


#4

ok thank you!


#5