Debug WMS configurator custom script



I was wondering, if there exists an opportunity to debug a self-written script within the WMS configurator.
Although I saw documentations about built-in functions and JavaScript can be debugged locally as well, the combination of both creates bugs, if the custom script gets more complicated.
Therefore, I just see that the preview window shows no results while error messages are absent.



I know perfectly what you mean… Came across the same problem when trying to do multi-temporal processing, where it gets even more complicated, due to “multi-dimensional” matrix of information.

For the moment there is no easy way to do it. What I do is that I use “echo” function but in image-way, e.g. “return [1,0.75,0.8];” (return pink dot) in the relevant places.
Generally though if there is no error message, it almost certainly means that the script compiles OK, that the error is somewhere else.

We are at this moment working on second, advanced version, of custom script, which will make it possible to have actual “debug outputs” at specific places, planned to be released in July or so.


Another note - I often use Sentinel Playground and its “Custom” option and write script there before I copy-paste it to Configuration utility. It allows faster iteration as it is simple to click “Refresh” (rather than saving and then clicking preview)