How do you debug Plugin Development using VSCode?

Hi all -

Just getting starting learning how to develop plugins, and a bit stuck on how I can access debugging through VSCode…I’m not very familiar with the whole ‘esbuild’ context so would appreciate any insight into how to incorporate this into a regular debugging session?

cmd/ctrl-shift-i in Obsidian. Opens the javascript console. Use console.log to send things to it. To quickly reload Obsidian and all plugins, use cmd-r while the console is focused.

Unless I am missing something, cmd/ctrl-shift-i in Obsidian shows only the generated JavaScript in the Sources tab. OP wants to use the debugger in VS Code against the TypeScript sources. I am trying to do the same thing.

then in console: app.plugins.plugins["[Plugin ID]"].constructor
plugin-id is your plugin name from package.json
then you have your code in sources as typescritpt, same as in VSCODE
set breakpoint here etc