Scripting/Testing workflow

Hi everyone!

I’ve been using MT for a couple of months now and, since the moment I coded my first script, I’ve improved (rather optimized) quite a bit my workflow… Even so, I still think there is room to improve. At the moment, my workflow is:


  1. Coding the desired script in VSCode (with the ROS extension installed for syntax highlighting, snippets, etc.)
  2. Once I finish, connect to a MT Router via SSH (I prefer using the terminal over Winbox)
  3. Once logged in: add the script, edit the source, paste the script, ctrl+o to save it and, finally, run the script (3 commands)

If anything went wrong, I switch back to VSCode to find the mistake. Once it is solved, go back to MT, remove the old version of the script and repeat the 3rd step of the previous list (so, 4 commands in total: remove, add, edit and run). Note: I remove the script instead of editing it because I haven’t found yet a shortcut to select all the source and delete it all at once.

What is really painful to me is the 3rd step, having to type each of the 3 or 4 commands every time I need to make a change… Do anyone know how to improve this process? if so, how is your scripting/testing workflow?

If you use the search function you will find several topics about this.

You can even scroll throught the script after it displays where the syntax is incorrect and correct it.

Past in tertminal after pressing F5 (clearing window). Put your code between { and } and it will be not executed so you can check the syntax. I am using a editor to apply the corrections and then past the corrected code in the terminal in Winbox.