Asked — Edited

Print(Txt) Script Function Does Not Work As Documented

The documentation for the script print function indicates that it should output to the debug window:


Print( txt )
Outputs the specified text to the debug console
Example: Print(This is some text)
Example: Print(Today is $Day)
Example: Print($pi rounded is Round($pi, 2))

However, it is only outputting to the script window, so if I have a print command in a script in script manager or other objects it outputs if that object has a display window, but not if it doesn't (I discovered this while testing a custom movement panel, and I could not see if I had hit the script location I wanted because the print had nowhere to output).

As usual, I have found a workaround, I set a variable and use variable watcher to see if it is hit rather than the print command, but either the documentation or the code should be updated.

Alan


ARC Pro

Upgrade to ARC Pro

Join the ARC Pro community and gain access to a wealth of resources and support, ensuring your robot's success.

PRO
Synthiam
#1  

correct - the debug console of the script. Every script has a debug console. You can also see the debug console when editing a script, and pressing RUN within the script editor. There is additional information in the learn section for ARC lesson which describes how to edit a script.

Here is a direct link: https://synthiam.com/Tutorials/Lesson/23?courseId=6

There is nothing wrong with the documentation regarding the debug console output of a script.

What you are referring to is ARC's debug window - which is not the same thing. Every control that has a console has it's own console - much like how every software program in Windows has it's own window. Every key on your keyboard has a letter or a number or a symbol. Every car has tires. etc:)

#2  

So, go back to my example. Using a script in a custom movement panel. It doesn't have its own debug window, so if I include print commands specifically for debugging, where do I see them?

A clarification to the documentation would easily fix this without code change, but I respectfully disagree with your interpretation that the document is correct since not every possible script location has its own debug window.

Alan

PRO
Synthiam
#3  

yeah - so there's a few functions that won't work in something without a debug console. PrintHex, DumpVariables, etc...

except - when editing a script. Every single script that you can edit in ARC has a console. Print() is a debug aid function, which would only be used for displaying debug information during the debug process - which when editing a script, is in the script console window. Here is the link to the script tutorial where the debug console is introduced: https://synthiam.com/Tutorials/Lesson/23?courseId=6

#4  

OK, I am going to try one more time..... Tutorials are great and all, but in the few cases where you do document something, it is important that the documentation be complete and accurate.

This could be easily fixed by simply changing this line in the script reference from:

Quote:

Outputs the specified text to the debug console

to

Quote:

Outputs the specified text to the debug console of the Script object (note not all objects with scripts have a debug console).

Would have saved me considerable time trying to figure out why my script wasn't doing what I wanted.

I am hoping when Ez-robot continues to grow that at some point you are able to hire a tech writer who can fully document all features completely and keep up with changes. If I wasn't worried about the job security of working for a startup or willing to give up RailRoad Retirement benefits, I would apply for the job. If you are still in need in 16 years when I retire, I'll apply then:)

If I ever have more free time to dedicate to it, I may follow-though on the thought of starting an EZ-Robot documentation WIKI as a volunteer project, but that is only as good as the ability of contributors to keep up, so if I can't dedicate enough time to do it all myself, I don't want to start it.

Alan