Understand the debugging logs on Dashboard

Hi,
After uploading clouds code, I ve got following logs on Dashboard Log Info: But I fell confused understanding those line numbering? Which numbers are for the lines of my Clouds code?

2021-08-03T10:30:32.515Z - SyntaxError: Unexpected identifier
at customUserPlugin (/moralis-server/cloud/main.js:15:26)
at /moralis-server/lib/cloud-code/plugins/index.js:62:15
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async Object.initialize (/moralis-server/lib/cloud-code/plugins/index.js:51:3)
2021-08-03T10:30:32.514Z - CLOUD FUNCTION ERROR PLEASE CHECK YOUR CLOUD FUNCTION CODE

Hey @tungtien

I’m not ready to answer you about which numbers are for the lines of your Cloud code.
I recommend you to use Moralis CLI. You will be available to work with your cloud code from your Code Editor.

Now, try to paste your code to code editor and check if there are any typos

Yes. I am using CLI. But when I got the error… I got difficulty finding it, because line numbers on the dash board seems not matching with numbers of my clouds code (?)

we are working on improving this, for now the lines in error messages won’t match your code, soon we will update CLI so that errors are caught locally on your machine before they are uploaded to Moralis which will improve debugging alot

1 Like

Hey @tungtien

Can you please share the code that generated the syntax error?
Feel free to paste it here so that I can replicate the issue.

thanks,