# How to Debug Custom Database Action Scripts

**URL:** <https://community.auth0.com/t/how-to-debug-custom-database-action-scripts/77548>\
**Category:** Get Help\
**Tags:** debug, database-action-scri, login\
**Created:** [February 3, 2022, 1:18am UTC](https://community.auth0.com/t/how-to-debug-custom-database-action-scripts/77548 "2022-02-03T01:18:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![erik.griffin](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/erik.griffin/32/34894_2.png) [@erik.griffin](https://community.auth0.com/u/erik.griffin)\
**Post date:** [February 3, 2022, 1:18am UTC](https://community.auth0.com/t/how-to-debug-custom-database-action-scripts/77548/1 "2022-02-03T01:18:22Z")

</div>

Hi,

I am building an Action Script to test the automatic migration of our existing users to the Auth0 database. I have followed the steps to set this process up, and have built my action script for Login.

When running the “Save and Try” option for the script, I’ll get back errors about the script failing for various reasons, however I’m not sure how to get more fine-tuned debugging of the script.

Many of the [Action Script Templates](https://auth0.com/docs/authenticate/database-connections/custom-db/templates/login) show `console.log()` being used, however when I open the developer tools there are no logs present when I running the “Save and Try” login script. Where may I view the log information for testing an Action Script? Or where is the better place to test and develop such scripts?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [February 4, 2022, 10:05pm UTC](https://community.auth0.com/t/how-to-debug-custom-database-action-scripts/77548/3 "2022-02-04T22:05:47Z")

</div>

Hi @erik.griffin,

Welcome to the Auth0 Community!

I understand you have questions on how to debug your custom database scripts.

To do so, there is the option to use the [Auth0 Real-time Webtask Logs Extension](https://auth0.com/docs/customize/extensions/real-time-webtask-logs) to view those `console.log` outputs and exceptions.

This should help provide more context to the errors in your Login script.

Please let me know if you have any further questions.

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:** [February 19, 2022, 10:06pm UTC](https://community.auth0.com/t/how-to-debug-custom-database-action-scripts/77548/4 "2022-02-19T22:06:24Z")

</div>

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.
