Console.log not working inside a firebase query

I want to debug a firebase resource query, basically trying to console log the values of my script, but the console.log or console.error messages are not being shown in the Retool console. However, the console.logs work just fine when creating a JS Query.

I am building a dashboard panel and the objective of the script I want to run is to retrieve all "posts" from a single user in a selected date or a selected date range. I've basically tried writing console logs in every place, but not of them are being shown.

Also, here is the complete query or script I want to debug by using the console logs: https://gist.github.com/LuFC-SSD/066cfa79f6e5e2fcc2b220361eddc390

Is there a way I can debug a firebase resource query? Or can I use the firebase admin sdk in a JS Query?