# Log perspective event script errors to console

**URL:** <https://forum.inductiveautomation.com/t/log-perspective-event-script-errors-to-console/113105>\
**Category:** Ignition\
**Tags:** perspective, scripting\
**Created:** [January 6, 2026, 7:36pm UTC](https://forum.inductiveautomation.com/t/log-perspective-event-script-errors-to-console/113105 "2026-01-06T19:36:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 6, 2026, 7:36pm UTC](https://forum.inductiveautomation.com/t/log-perspective-event-script-errors-to-console/113105/1 "2026-01-06T19:36:08Z")

</div>

Is there any way in perspective to set up a project such that any errors in event scripts (e.g. on component actions) get logged to the browser console?

(the answer here might be ‘ignition module’. i’m comfortable with it being ignition module)

X-Y problem: if i as a user click a button in a perspective session and the button doesn’t work, i want to have some way of seeing ‘hey the button didn’t work and here’s why’ so i can report that

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 6, 2026, 7:39pm UTC](https://forum.inductiveautomation.com/t/log-perspective-event-script-errors-to-console/113105/2 "2026-01-06T19:39:43Z")

</div>

Automatically, no.

Perspective event scripts run in the gateway, and have no direct access to the browser itself. The only tool is `system.perspective.print()`, which you'd have to put in a decorator, and decorate all your library scripts, and ensure all of your Perspective events/transforms delegate to the project library.

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [January 6, 2026, 7:43pm UTC](https://forum.inductiveautomation.com/t/log-perspective-event-script-errors-to-console/113105/3 "2026-01-06T19:43:01Z")

</div>

if i wrote all my event scripts as

`function header from ignition(): `  
` try:`  
` body`  
` catch (Exception,java.lang.Exception) as e`  
` system.perspective.print(e.stacktrace())`  
` throw e`

would this break for any obvious reasons

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [January 6, 2026, 7:47pm UTC](https://forum.inductiveautomation.com/t/log-perspective-event-script-errors-to-console/113105/4 "2026-01-06T19:47:12Z")

</div>

Don’t think that would necessarily break anything - but I wouldn’t write all my code like that.

Make a decorator that does that bit - try/except and system.perspective.print, and make sure all your event scripts are one line function calls. Then decorate the functions you are trying to debug with the decorator.

Plenty of examples on the forum of how to write a decorator if you look
