Skip to main content
17-Peridot
November 22, 2020
Question

No error line number in log for JavaScript Service sometimes

  • November 22, 2020
  • 2 replies
  • 1327 views

Hi, 

Sometimes the log, including the Application log and Script log,  doesn't tell which line the error occurs like the screenshot below : 

 

How can I know where the problem is ?  (except print logs in the service to guess )

 

seanccc_1-1606016186729.png

 

 

seanccc_0-1606016162918.png

 

ThingWorx version : 8.5.5

 

Regards,

Sean

2 replies

5-Regular Member
November 23, 2020

The script editor here is not a fully functional compiler, so there's not a warning for which line has the error, and normaly JS scripts here are short so it's not hard to locate the problem.

 

You can use try catch to find the error, or cut scripts to smaller sections and test them indepently (check if the results of each section is correct)

5-Regular Member
November 23, 2020

Hi @seanccc , you will find much more help using scripterror.log file present in /ThingworxPlatforms/logs folder.

 

Regards

Ankur