Hello all,
I have a browser item Javascript debugging question: is there a way to see the javascript engine output, and do you have any recommendations for running/testing code outside of Zabbix?
I ask because we have been replacing our web scenarios with Selenium browser-based checks and it's great for the most part. It's allowed us to generate 2FA/MFA tokens which was impossible with the old web scenarios (feel free to ask for the TOTP javascript code if you're interested).
However it's been a pain to debug Javascript errors. Log statements (eg. Zabbix.log(3, "something"); ) help, but if there's a syntax error that prevents the script from running, nothing shows up in the server logs. This happens fairly frequently since the version of Javascript used by Zabbix/Selenium doesn't have some of the newer syntax and features, and thus it's easy to accidentally introduce errors that prevent anything from running.
Does anyone know of a way to see the javascript engine output. Also, do you have any recommendations for how to test this code before throwing it into a browser item?
Thanks!
I have a browser item Javascript debugging question: is there a way to see the javascript engine output, and do you have any recommendations for running/testing code outside of Zabbix?
I ask because we have been replacing our web scenarios with Selenium browser-based checks and it's great for the most part. It's allowed us to generate 2FA/MFA tokens which was impossible with the old web scenarios (feel free to ask for the TOTP javascript code if you're interested).
However it's been a pain to debug Javascript errors. Log statements (eg. Zabbix.log(3, "something"); ) help, but if there's a syntax error that prevents the script from running, nothing shows up in the server logs. This happens fairly frequently since the version of Javascript used by Zabbix/Selenium doesn't have some of the newer syntax and features, and thus it's easy to accidentally introduce errors that prevent anything from running.
Does anyone know of a way to see the javascript engine output. Also, do you have any recommendations for how to test this code before throwing it into a browser item?
Thanks!
Comment