How to debug plugins from Zotero release version using DevTools on Windows
I am struggling to find how to debug Zotero 7 plugins on Windows using Firefox like developer tools, also called "multiprocess browser toolbox" apparently. I need to view the code and put breakpoints to inspect variable and try to understand what is the plugin doing (e.g., one of them has a bug).
For now, I can activate the console via Tools → Developer → Error Console.
When I click on a reference to some plugin code location, listed as a link like
See error below or screenshot:
Do you have any recommendations on how to properly inspect and debug plugin JavaScript code in normal Zotero using the dev tools window?
For now, I can activate the console via Tools → Developer → Error Console.
When I click on a reference to some plugin code location, listed as a link like
better-bibtex.js:47465:22, I get an error and I cannot access the code like I would do from Firefox for example.See error below or screenshot:
I tried starting Zotero using CMD with this command (source), but it does not work with the default Zotero, only with the beta and does exactly what I want:
TypeError: this.gViewSourceUtils is undefined webconsole.js:223:5
viewSource resource://devtools/client/webconsole/webconsole.js:223
onViewSource resource://devtools/client/webconsole/service-container.js:43
onClick resource://devtools/client/shared/components/Frame.js:265
React 19
"C:\Program Files\Zotero\zotero.exe" -ZoteroDebugText -jsdebuggerHowever, I want to debug the program in the same environment (same version) as my default Zotero. I also don't want to generate conflicts and break my libraries by using the beta version.
Do you have any recommendations on how to properly inspect and debug plugin JavaScript code in normal Zotero using the dev tools window?
Upgrade Storage
I had to figure out that I have to use CMD, running the same command with PowerShell did not work.
EDIT: also here https://www.zotero.org/support/dev/zotero_7_for_developers
Just to note, for another source that might be helpful: https://windingwind.github.io/doc-for-zotero-plugin-dev/
From what I could read there, it seems that using the beta is the only way. I find it really strange that it's not possible to debug the exact same Zotero installation with which I encounter a certain bug.
devtools.debugger.remote-enabledto true before using-jsdebugger.(We can probably change this. We didn't used to bundle the devtools with production releases, but now all builds include them.)
Great to hear that!