Is it possible to debug a plugin from VSCode?

I am referring to being able to set breakpoints, because by default, they’re marked as “unbounded breakpoint”, and they do not work.

2 Likes

There are various resources out there related to how to debug from within the Obsidian window in Developer Tools. I’ve yet to manage to set breakpoints from within VS Code and trigger the breakpoints in TypeScript.

Using just Developer Tools though, you could connect the sources so that you’re able to debug and set breakpoints in the compiled javascript, and for my needs that has usually been enough whenever I needed something beside the pure output from console.log().

A neat little trick is to call the debugger keyword from your javascript to instantly trigger a debugger pause point at that point in the code. Another way into your code could be to willfully trigger an exception, so that in the console you can click on the source link in the upper right of that exception.

A few links related to debugging in Developer Tools:

I would like to know this as well.