How to debug javascript Decode function

I have a problem in my Decode function, is there a way to check for errors in the execution of this function?
Real problem is that I tested my Decode function and it works with some input data but it fails when invoked in appserver. Can I use console.log and see the output in some place?

I can add more details or you can have a look here:

Please refer to the LoRa App Server log-output and the live device events tab in the web-interface. Both show the runtime errors in the Decode and Encode functions.

Hey @brocaar I am a first time user here and trying to log out my decode function but haven’t managed to see any logging in the device data section. Could you provide more details on this for debugging please?

if you are using mqtt as an integration you could use our tool:

salamander tries to help with debugging lora payloads with help of MQTT.

  • Simple subscribe to MQTT channels
  • Defining a JS-decoder to run against a device payload data
  • Storing recieved payloads in JSON
  • A Testrunner for that matches expected JSON after decoding the payload