Home    |    GitHub Page    |    API    |    FAQ

First steps in plugin development


I've installed Joplin 1.3.18 on Windows (Node.js 14, then 12, no change).

I create a basic plugin, (followed "Getting started with plugin development", steps 1 (created "toc" plugin), 2 and 3.

In the console, I see:

main-html.js:49 19:10:09 Plugin Service: PluginService: Loading plugin from W:\Joplin\toc
main-html.js:49 19:10:11 Plugin Service: Starting plugin: toc
main-html.js:49 19:10:11 Plugin Service: Finished running onStart handler: toc (Took 98ms)

However, despite the fact that the plugin code contains:
onStart: async function() {
console.info('Test plugin started!');

I don't see any other message.

Also, trying to understand what goes on, I've placed a breakpoint in main-html.js at line 49, but the breakpoint is activated 3 times (till appType: desktop" gets printed), and that's it.

I've also set a breakpoint in C:\Program Files\Joplin\resources\app.asar\lib\services\plugins\api\JoplinPlugins.js, at line 36, where I see:
this.logger.info(Starting plugin: ${this.plugin.id});

Execution doesn't stop either.

Can anyone help?


The plugin system has changed quite a bit since that version so it's best to use the pre-release if you want to develop a plugin. In your particular case, I suspect the plugin dev tool window is hidden by the app dev tool window, but this has been fixed in v1.4

I now see the log in the second console (1.4.11). Thanks