Is there an external tool that help in script writing? When I use directly winbox I don't have any debug method. I must insert some log output to check for example variables content. If there is a syntax error the script doesn't run but I don't know where is the problem.
Thanks in advance
For debugging you are doing it correctly by using "output" commands in order to see if the variable contains the desired value.
Regarding syntax errors, you can edit scripts via CLI with "/system script edit MyScriptName value-name=source
". Whenever you see text red, syntax is wrong. Press F5
to update the syntax check.
Otherwise, you can use "/system script print
" and it will output the scripts with the syntax highlighter and the same rule applies -> red text has errors.