I have been developing some scripts and have been troubled bu debugging. I find it very hard to debug scripts as I have not found a way to get reports on syntax errors or simple problems. If there is even a slight error the script does not run and no output is generated. I find this is making it very difficult to debug what are otherwise quite simple to write scripts.
Is there something obvious (or not so obvious) that I have missed regarding script debugging? How does everyone debug and find errors in scripts?
Version 3.0 shows syntax errors when you type script directly in console.
Also you can check syntax errors by typing:
/system script> print from=
Console will mark character where syntax error starts.
Thanks for the reply. Most of the routers I have worked with are 2.9 but have some on 3.0 using beta and rc.
On the 3.0 boards print worked fine and displays syntax errors in red.
However the syntax highlighting as I type does not work and shows text just in black. Are there are options to enable highlighting or do I need a more recent version of Winbox?