How can I view the ouput of Console.log() which I added for testing inside the source code of a plugin?
When you run the app with your plugin included, there is a separate developer tools window for plugin code. You can view the output there.
Can you please elaborate more?
A detailed guide for developing, building, testing a plugin can be found here, you can check that out.
What about testing on the desktop app? is there any specific procedure for testing? Where the output of the console.log() will be shown? @makb
When you run the dev version it should open dev tools on startup. You should see your logs there.
I wasn't able to see any logs that I applied for testing:).
I suspect you may need to run npm watch or recompile typescript manually
I think you need to run
npm run dist to compile the plugin. Also make sure you have included your plugins path into the 'development plugins' field in the app.
npm run watch worked fine. Thanks, @roman_r_m .
@makb I was asking about testing of the desktop app.
I'm trying to pick up writing the plugins.
I tried the example plugin, but I don't see the console log anywhere including the console in the dev environment (Help -> Toggle Development Tools).
I also log (from main-html.js)
joplin.plugins: Finished running onStart handler: com.try.UdayTestJoplinPlugin (Took 2ms)
but nothing from index.ts where we have the hello world output.
The console output from a plugion is only shown in the dev console from the plugin when you load the plugin as dev plugin in Joplin under
Options > Plugins
I had to delete it from Manage your plugins to see the logs from what you suggested.
Thanks for helping out.