Output Console Not Showing Debug Print Statements

Hi, I’ve had the problem for a while that when adding print statements to various scripts throughout ignition I am not seeing the prints in the output console. I’m not sure why this is happening. Am I looking in the wrong spot for my test outputs or am I doing something else wrong. Any help appreciated. Thanks

If you’re adding scripts that will ultimately be executed in the gateway scope (tag event scripts, gateway timer scripts, tag change scripts, etc) then these statements will go into the wrapper.log file and nowhere else. If you want them to be visible in the Status -> Logs page, then use system.util.getLogger instead of print statements.

1 Like

That’s not the case. I’m just adding the scripts in to certain button functions and still not seeing anything with that

Can you provide one of these scripts? I’ve never seen a print statement that was actually executing not get output to the console.

I actually tested it with just a button that all it had in it was:
print ‘test’
and I still got nothing printed in the console.

Could you take a screenshot of where you’re adding the script and the console you’re looking at?

All I have is this running on the close button for testing and I get nothing in the output console.

What event handler do you have it added to?

I have it set to “actionPerformed”

You should get in contact with support - if you have a support contract, they can get onto your system live and take a look at what’s going on, because I’ve never seen this fail, and I have no idea what the problem might be.

I’m not sure what just changed but all of a sudden I started getting prints in the console from a different script on another button that I wasn’t getting before. If I keep seeing issues I will use our support number to dive into the problem more deeply.

1 Like

I have had a similar issue except I get a buffer overflow error message. To reproduce create a tag browse tree and under the filter tag extension function put a print statement. After expanding some folders the print statements will stop. Then trying to print from an action preformed event handler on a button will give this error message

Traceback (most recent call last):

  File "<event:actionPerformed>", line 1, in <module>


java.nio.BufferOverflowException: java.nio.BufferOverflowException

	caused by BufferOverflowException

Ignition v7.9.5 (b2017111615)
Java: Oracle Corporation 1.8.0_101

Any updates on this issue, still appears to exist in v7.9.10?
I was playing with the Tag Browse Tree and scripting the filterTag extension and could not get any print statements to work. After that, having never tried scripting a print statement previously I decided to go simple and create a new window, with a single button, with a single line of script.

And am now met with this error anytime I press the button.

I should add that restarting designer made the issue with the scripted button go away and I was able to see the output in the output console (initially).

However after opening the window on which I had placed the Tag Browse Tree with a ‘print tag.name’ in the scripted filterTag extension. Returning to the window with the scripted button and pressing it again caused the the previous error (java.nio.BufferOverFlowException).

Update: Restarted designer and attempted to see whether I could reliably reproduce the issue each time and I cannot. Now the print statements in the scripted button and the scripted filterTag extension work without issue.


Is there any update on this topic?
I am having similar issue: my script in Tag Browse Tree (in Filter) is ignored. I simplified script and now it is just:
print tag.name
return True

I am using version 7.9.10

explanation of how to use system.util.getLoggger

Verify if you are checking the console in the right scope, for exemple:

if you are testing inside designer, you can check on Tools->Console
If you are doing test on a client, Ctrl+Shift+F7 will give you the Console from the client side, which is totally logic.

This solved my problem.

I had the same problem and I’ve found a solution here (it’s for perspective) :
Have a good day !


I have reproduced this several times by accidentally causing an infinite recursion exception, then at some point after that I start getting:

at java.base/java.nio.HeapByteBuffer.put(Unknown Source)
at org.python.core.io.BufferedWriter.write(BufferedWriter.java:41)
at org.python.core.io.BinaryIOWrapper.write(BinaryIOWrapper.java:118)
at org.python.core.io.TextIOWrapper.write(TextIOWrapper.java:260)
at org.python.core.PyFile.file_write(PyFile.java:456)
at org.python.core.PyFile.write(PyFile.java:460)
at org.python.core.StdoutWrapper.printToFile(StdoutWrapper.java:117)
at org.python.core.StdoutWrapper.print(StdoutWrapper.java:186)
at org.python.core.StdoutWrapper.println(StdoutWrapper.java:272)
at org.python.core.Py.println(Py.java:1905)
at ils.log.LogRecorder$py.emit$37(C:\Users\aedmw.ignition\cache\gwlocalhost_8088\C0\pylib\ils\log\LogRecorder.py:363)

I know it’s nothing specific to ils.log.LogRecorder.py because if I keep trying at some point it will move to a different print statement earlier in the code. I also know this because a restart of Designer causes it to go away until the next time I cause an infinite recursion.

Well, from that stacktrace, there’s literally no Ignition code being invoked; it’s all Jython’s internals that aren’t handling an infinite stream of incoming data cleanly. Which, sure, maybe they could do better, but also, don’t print in infinite loops :slight_smile: