Debugging in UXP plugin?

Hello Everyone,

Is there any possibilities to debug the UXP plugin in external browser with UDT? For example if I develop one plugin which working fine in dev(my local env), after packaging and give to the production suppose it is not working how to debug the plugin with UDT?

1 Like

Hi @Vijay_0106 ,

Do you mean “just” debugging a plugin that you (on your – the developer’s – machine) installed from a packaged file / the marketplace? Or do you mean tracking down bugs on a customer’s computer?

If the latter, I would suggest that you log essential steps of your plugin (and, most importantly, errors) to a file and add instructions for your customers to send you the log if anything goes wrong (there are also more “fancy” solutions for this like sentry.io, but these come with a bunch of overhead and complexity in terms of privacy/data protection issues which isn’t a lot of fun in terms of legal requirements, and in my experience, good logs that you can look at are typically sufficient). Alternatively, you could also save these logs into the localStorage and add an option for users to “export” these logs to a text file that they can send to you…

If you mean debugging packaged things on your computer, the answer, unfortunately, stays the same: the best approach I’ve found was writing log files and analyzing them (I don’t know of any way to debug packaged plugins with UDT).

I hope this helps (even though it might not be the answer you were hoping for),
Best,
Zuri

If some of the user machines haven’t UDT for this case how to debug if any issues comes in the UI part or if the plugin doesn’t respond, how to check the issues in external browser console window without UDT is it possible?

As I said, I don’t know of such an option and would recommend using log files for this use-case.