# How to develop/debug scripts on gateway

**URL:** <https://forum.inductiveautomation.com/t/how-to-develop-debug-scripts-on-gateway/81319>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [November 1, 2023, 4:20pm UTC](https://forum.inductiveautomation.com/t/how-to-develop-debug-scripts-on-gateway/81319 "2023-11-01T16:20:39Z")\
**Posts on this page:** 1\
**Showing post:** 17

<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:** [September 7, 2024, 8:34pm UTC](https://forum.inductiveautomation.com/t/how-to-develop-debug-scripts-on-gateway/81319/17 "2024-09-07T20:34:17Z")

</div>

> [@Eugene49](#):
>
> will take the same amount of time

Yes, indistinguishable difference in execution time. But 1:1 execution time is not the reason to use the project library. The reasons are, to start:

- Functions in the project library are re-usable. When carefully designed, they can be used in many parts of your application.

- Functions in the project library can re-use constants and cached values that are stored in named variables **outside** the `def`. This **does** reduce execution time, as those variables persist from call to call.

- Functions in the project library are maintenance-friendly, particularly that they are stored in the filesystem in plain text as `code.py`, and are therefore very friendly to source code control, like `git`.

The sort of callout to a library function shown in your [comment #13](https://forum.inductiveautomation.com/t/how-to-develop-debug-scripts-on-gateway/81319/13) could be a one-liner, like so:

```python
    return functions.tagListGetDetails(self.view.params.tagList)

```

That is a good habit.

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-develop-debug-scripts-on-gateway/81319)._
