# Output Console Not Showing Debug Print Statements

**URL:** <https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049>\
**Category:** Ignition\
**Tags:** ignition79, scripting\
**Created:** [August 1, 2018, 3:43pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049 "2018-08-01T15:43:23Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![awaege](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@awaege](https://forum.inductiveautomation.com/u/awaege)\
**Post date:** [August 1, 2018, 3:43pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/1 "2018-08-01T15:43:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 1, 2018, 4:25pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/2 "2018-08-01T16:25:46Z")

</div>

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`](https://docs.inductiveautomation.com/display/DOC79/system.util.getLogger) instead of print statements.

---

<div class="post-metadata">

**Author:** ![awaege](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@awaege](https://forum.inductiveautomation.com/u/awaege)\
**Post date:** [August 1, 2018, 4:37pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/3 "2018-08-01T16:37:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 1, 2018, 4:45pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/4 "2018-08-01T16:45:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![awaege](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@awaege](https://forum.inductiveautomation.com/u/awaege)\
**Post date:** [August 1, 2018, 4:56pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/5 "2018-08-01T16:56:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 1, 2018, 4:58pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/6 "2018-08-01T16:58:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![awaege](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@awaege](https://forum.inductiveautomation.com/u/awaege)\
**Post date:** [August 1, 2018, 5:07pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/7 "2018-08-01T17:07:11Z")

</div>

![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/c/c463657d893f5bc3b2e4ea63566bc3e597b62947.PNG)  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/0/0ab3365bfb39c0109cbc68ca3cee191bb1396380.PNG)

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

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 1, 2018, 5:46pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/8 "2018-08-01T17:46:06Z")

</div>

What event handler do you have it added to?

---

<div class="post-metadata">

**Author:** ![awaege](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@awaege](https://forum.inductiveautomation.com/u/awaege)\
**Post date:** [August 1, 2018, 5:57pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/9 "2018-08-01T17:57:11Z")

</div>

I have it set to “actionPerformed”

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 1, 2018, 6:05pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/10 "2018-08-01T18:05:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![awaege](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@awaege](https://forum.inductiveautomation.com/u/awaege)\
**Post date:** [August 1, 2018, 6:06pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/11 "2018-08-01T18:06:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jordanv](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jordanv](https://forum.inductiveautomation.com/u/jordanv)\
**Post date:** [August 2, 2018, 8:18pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/12 "2018-08-02T20:18:16Z")

</div>

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

```auto
Traceback (most recent call last):

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

java.nio.BufferOverflowException

java.nio.BufferOverflowException: java.nio.BufferOverflowException

	caused by BufferOverflowException

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

```

---

<div class="post-metadata">

**Author:** ![tyler.bennett](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@tyler.bennett](https://forum.inductiveautomation.com/u/tyler.bennett)\
**Post date:** [December 20, 2018, 12:19am UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/13 "2018-12-20T00:19:38Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tyler.bennett](https://avatars.discourse-cdn.com/v4/letter/t/f04885/32.png) [@tyler.bennett](https://forum.inductiveautomation.com/u/tyler.bennett)\
**Post date:** [December 20, 2018, 12:49am UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/14 "2018-12-20T00:49:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![francisco.carmona](https://avatars.discourse-cdn.com/v4/letter/f/e68b1a/32.png) [@francisco.carmona](https://forum.inductiveautomation.com/u/francisco.carmona)\
**Post date:** [February 19, 2019, 1:27pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/15 "2019-02-19T13:27:40Z")

</div>

Hello,

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  
Thanks

---

<div class="post-metadata">

**Author:** ![ematschke](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ematschke/32/7544_2.png) [@ematschke](https://forum.inductiveautomation.com/u/ematschke)\
**Post date:** [February 21, 2019, 11:36pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/16 "2019-02-21T23:36:38Z")

</div>

explanation of how to use system.util.getLoggger

---

<div class="post-metadata">

**Author:** ![yudan.zhang.1](https://avatars.discourse-cdn.com/v4/letter/y/cc9497/32.png) [@yudan.zhang.1](https://forum.inductiveautomation.com/u/yudan.zhang.1)\
**Post date:** [September 14, 2021, 2:56pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/17 "2021-09-14T14:56:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Togapix](https://avatars.discourse-cdn.com/v4/letter/t/8c91f0/32.png) [@Togapix](https://forum.inductiveautomation.com/u/Togapix)\
**Post date:** [May 3, 2022, 12:12pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/18 "2022-05-03T12:12:53Z")

</div>

Hello,  
I had the same problem and I’ve found a solution here (it’s for perspective) :  
[https://docs.inductiveautomation.com/display/DOC81/system.perspective.print](https://docs.inductiveautomation.com/display/DOC81/system.perspective.print)  
Have a good day !  
Togapix

---

<div class="post-metadata">

**Author:** ![Daniel\_Webb](https://avatars.discourse-cdn.com/v4/letter/d/67e7ee/32.png) [@Daniel\_Webb](https://forum.inductiveautomation.com/u/Daniel_Webb)\
**Post date:** [June 18, 2022, 10:59pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/19 "2022-06-18T22:59:30Z")

</div>

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

java.nio.BufferOverflowException  
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.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [June 21, 2022, 6:34pm UTC](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049/20 "2022-06-21T18:34:05Z")

</div>

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 🙂

[Next page](https://forum.inductiveautomation.com/t/output-console-not-showing-debug-print-statements/19049.md?page=2)
