# UXP Developer tool lazy

**URL:** <https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774>\
**Category:** UXP Developer Tool\
**Created:** [April 8, 2021, 9:32pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774 "2021-04-08T21:32:00Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdophoto](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pdophoto/32/1304_2.png) [@pdophoto](https://forums.creativeclouddeveloper.com/u/pdophoto)\
**Post date:** [April 8, 2021, 9:32pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/1 "2021-04-08T21:32:00Z")

</div>

Hi everyone,  
Is this tool lazy or does it have a timer to shut it down?  
I have been working with it from 10:00AM till 5:00PM, it is the fourth time it vanishes. The more I work with it, the shorter delays between failures.  
Is this normal or ???  
Is there a remedy?

---

<div class="post-metadata">

**Author:** ![AnthonyK](https://avatars.discourse-cdn.com/v4/letter/a/85f322/32.png) [@AnthonyK](https://forums.creativeclouddeveloper.com/u/AnthonyK)\
**Post date:** [April 8, 2021, 9:41pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/2 "2021-04-08T21:41:56Z")

</div>

It does this, it seems, when you have it set to “Watch” a particular plugin, i.e. reload it after saving a coding change. After some unspecified number of reloads, it gets stuck in some loop (based on the whirring I hear from my computer) and then shuts down and closes. At least that’s the behavior on my Windows computer. Frustrating, but I just restart it and reload the panel. Mine shuts down about 4 times every hour, so it’s apparently a lot lazier than yours.

---

<div class="post-metadata">

**Author:** ![simonhenke](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/simonhenke/32/957_2.png) [@simonhenke](https://forums.creativeclouddeveloper.com/u/simonhenke)\
**Post date:** [April 8, 2021, 10:23pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/3 "2021-04-08T22:23:29Z")

</div>

The watch function has always been really slow for me, so I started to just refresh it manually. Those 2-3 clicks feel a lot faster and more responsive than the unnecessary long delay from the watch refresh 🤷‍♂️ I think I’ve read something in the update notes that there were problems with projects including node\_modules folders, but I’m quite sure that it’s still slow.

---

<div class="post-metadata">

**Author:** ![pdophoto](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pdophoto/32/1304_2.png) [@pdophoto](https://forums.creativeclouddeveloper.com/u/pdophoto)\
**Post date:** [April 9, 2021, 12:03am UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/4 "2021-04-09T00:03:45Z")

</div>

Thanks for your reply.  
I will have to change my workflow.

---

<div class="post-metadata">

**Author:** ![pdophoto](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pdophoto/32/1304_2.png) [@pdophoto](https://forums.creativeclouddeveloper.com/u/pdophoto)\
**Post date:** [April 9, 2021, 12:06am UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/5 "2021-04-09T00:06:35Z")

</div>

Thanks for your reply

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [April 9, 2021, 3:00pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/6 "2021-04-09T15:00:45Z")

</div>

The UDT should not be crashing, quitting, or slow on reloads, even on Windows (w/ the exception of including the node\_modules folder – that _will_ slow everything down – so check that first.)

I’m forwarding this to the team – you may be asked to provide some logs to help diagnose the issue you’re facing.

---

<div class="post-metadata">

**Author:** ![simonhenke](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/simonhenke/32/957_2.png) [@simonhenke](https://forums.creativeclouddeveloper.com/u/simonhenke)\
**Post date:** [April 9, 2021, 5:17pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/7 "2021-04-09T17:17:09Z")

</div>

But how do we exclude the node\_modules folder in the first place?  
I just tried the watch function again and it’s completely unusable for me, it gets slower and slower with each refresh until it freezes or crashes.

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [April 9, 2021, 6:26pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/8 "2021-04-09T18:26:49Z")

</div>

The key is to have a separate _dist_ folder. Our Photoshop React samples are already doing this, but our XD React samples don’t do this yet (it’s in process).

You’ll want to tweak the `webpack.config.js` file so that your plugin’s build files are emitted to `dist` (along with copying the `manifest.json` and any assets). An example of this is here: [uxp-photoshop-plugin-samples/webpack.config.js at main · AdobeDocs/uxp-photoshop-plugin-samples · GitHub](https://github.com/AdobeDocs/uxp-photoshop-plugin-samples/blob/main/ui-react-starter/webpack.config.js) (note the `devtools` setting will _not_ work on XD – use `source-map` instead).

At this point, you can either add `dist/manifest.json` to the UDT, _or_, you can keep the existing setting and tell UDT where the build folder is (••• \> Options \> Advanced \> put path to `dist` \> Save).

Alternatively, you can try moving a copy of your plugin’s `manifest.json` file into your `src` older. Then, add _that_ folder to the UDT and tell it that the build is in the parent directory. This will be a little slower than the above because UDT may have to copy your `src` files, but still faster than `node_modules`. You can do this with ••• \> Options \> Advanced \> `../` in path \> Save)

---

<div class="post-metadata">

**Author:** ![Sujai](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/sujai/32/2791_2.png) [@Sujai](https://forums.creativeclouddeveloper.com/u/Sujai)\
**Post date:** [April 12, 2021, 7:08am UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/9 "2021-04-12T07:08:49Z")

</div>

@simonhenke what version of UDT are you on? Can you ensure that you are on UDT v1.2.0.3, the latest on CCD? Node\_modules are ignored by default during watch if you are on v1.2.

If you are still seeing issues, do share the UDT logs present in temp directory(C:\Users\<username\>\AppData\Roaming\Adobe\Adobe UXP Developer Tool\Logs). Or a sample plugin for investigation would also be helpful.

---

<div class="post-metadata">

**Author:** ![pdophoto](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pdophoto/32/1304_2.png) [@pdophoto](https://forums.creativeclouddeveloper.com/u/pdophoto)\
**Post date:** [April 12, 2021, 1:23pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/10 "2021-04-12T13:23:29Z")

</div>

Hi, yes I have version 1.2.0.3  
I copied all the CCS files to the extension folder. This gives less UDT shutdowns and I think better panel performance.  
I attached a panel and 3 logs.  
But I think I solved a lot by adding the third line in index.js. Do I need others???

[Debugger.zip](https://forums.creativeclouddeveloper.com/uploads/short-url/q6D4hswGXrhO4LknRQSoWVEg4TY.zip) (578.2 KB)

---

<div class="post-metadata">

**Author:** ![kerrishotts](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/kerrishotts/32/8_2.png) [@kerrishotts](https://forums.creativeclouddeveloper.com/u/kerrishotts)\
**Post date:** [April 12, 2021, 3:08pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/11 "2021-04-12T15:08:52Z")

</div>

@pdophoto:

I’m not entirely clear on the state of your plugin _before_ the changes, but a couple notes:

1. _All_ your static assets should be local to the plugin and not loaded remotely. Loading remote CSS files is definitely going to slow down startup, and cause issues for users who are offline. Maybe that’s not what your plugin was doing, though – I’m reading between the lines.
2. The third line (`const UXP = require("uxp").app`) does nothing (it’ll just assign `undefined` to UXP, since there’s no `app` property in the UXP module. The only thing I can think of is _maybe_ it’s forcing the UXP module to load a little earlier – you might want to do something like `const UXP = require("uxp")`, and then replace your other uses of `require("uxp")` with `UXP`. Either way, this shouldn’t be impacting UDT stability. :-/

---

<div class="post-metadata">

**Author:** ![Pierre\_G](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pierre_g/32/971_2.png) [@Pierre\_G](https://forums.creativeclouddeveloper.com/u/Pierre_G)\
**Post date:** [April 12, 2021, 6:01pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/12 "2021-04-12T18:01:39Z")

</div>

My experience with UDT is seemless, since I understood that for some reason, the local path of a plugin _ **and it’s parent** _ shouldn’t contain exotic characters or too many spaces. 😀

You might want to take a look at your plugin full path name 😅

FYI, I have installed the Debugger that you provided, without modiying a single line.  
First I installed it in `hdd1 / soft / uxp / Plug Ins / Testing / Panel 01 / Debugger`. That’s an extrernal hard drive. UDT watches it OK, and reacts almost instantly to any changes in that folder provided you have set it to Watch in UDT of course.

However, when I install it in ` [[DATA]] / Debugger,` the Watch link gets broken!  
So, the install path matters for the Watch to… watch!

Further, if your plugin in hosted on a distant storage (LAN/NAS)(which is not really recommended), the Watch link get broken too.

FWIW, I’ve experienced UDT crashing quite often; the Watch wasn’t working… I always implement a Reaload button on the GUI or as a Flyout Menu option…but…It used to drive me _mad_ when I started UXP in Nov.2020!  
Since then, working on 7 new UXP panels for over 150 days, UDT is stable when I pay attention to the install work path.  
PS: I’m working with Vanilla JS, and have tested these scenarios on both Mac and PC.

---

<div class="post-metadata">

**Author:** ![simonhenke](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/simonhenke/32/957_2.png) [@simonhenke](https://forums.creativeclouddeveloper.com/u/simonhenke)\
**Post date:** [April 12, 2021, 10:24pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/13 "2021-04-12T22:24:34Z")

</div>

I’m on version 1.2.0.3, too. Also, my plugin has a separate dist folder, so theoretically node\_modules shouldn’t be the problem.  
I took a brief look at the logs but couldn’t see anything suspicious, but I might have to do further investigations. I planned to try it out with one of the starter plugins also, but it might take some days until I have time for that. I’ll post my results here once I’ve done the testing.

> [@Pierre\_G](#):
>
> I always implement a Reaload button on the GUI or as a Flyout Menu option

Which function did you use for the reload functionality?

---

<div class="post-metadata">

**Author:** ![Pierre\_G](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pierre_g/32/971_2.png) [@Pierre\_G](https://forums.creativeclouddeveloper.com/u/Pierre_G)\
**Post date:** [April 12, 2021, 10:31pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/14 "2021-04-12T22:31:45Z")

</div>

@simonhenke I am using `window.location.reload();`

---

<div class="post-metadata">

**Author:** ![simonhenke](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/simonhenke/32/957_2.png) [@simonhenke](https://forums.creativeclouddeveloper.com/u/simonhenke)\
**Post date:** [April 12, 2021, 10:38pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/15 "2021-04-12T22:38:13Z")

</div>

are you using React or vanilla JS? If i remember correctly, the `window.location.reload()` didn’t do a complete hard reload like the UDT does (in my case). For example reload a component that had a runtime error.

---

<div class="post-metadata">

**Author:** ![pdophoto](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pdophoto/32/1304_2.png) [@pdophoto](https://forums.creativeclouddeveloper.com/u/pdophoto)\
**Post date:** [April 12, 2021, 10:39pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/16 "2021-04-12T22:39:47Z")

</div>

Thank you so much for your help. But don’t waste to much time checking those files, I relocated my UXP folder from disk drive D:\Entrepot\LR-PE\UXP → SSD C:\UXP. All CSS folders are located in the the main extension folder.  
RESULTS: I have been operating for the last 9 hours without shutdown.  
As Pierre\_G said I use this on vanilla JS :  
document.getElementById(“btnThree”).addEventListener(“click”, function () {location.reload()});  
REACT for me is = ??? 😁

---

<div class="post-metadata">

**Author:** ![Pierre\_G](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pierre_g/32/971_2.png) [@Pierre\_G](https://forums.creativeclouddeveloper.com/u/Pierre_G)\
**Post date:** [April 12, 2021, 10:43pm UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/17 "2021-04-12T22:43:29Z")

</div>

Vanilla for now. Would love to jump in React in a near future…

---

<div class="post-metadata">

**Author:** ![DanielAllen](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/danielallen/32/1287_2.png) [@DanielAllen](https://forums.creativeclouddeveloper.com/u/DanielAllen)\
**Post date:** [April 13, 2021, 3:39am UTC](https://forums.creativeclouddeveloper.com/t/uxp-developer-tool-lazy/2774/18 "2021-04-13T03:39:36Z")

</div>

I believe it’s actually a memory leak when you’re using the Watch feature. I’ve actually stopped using Watch because it gets slower and slower every time it reloads until finally it stops responding altogether.

My advice is to not use Watch and just Reload each time you compile the code. You’ll be much happier with the performance!
