Thanks for the answers.
I had the problem that in the debugger I could not find my plugin / file so I could not open it within the debugger to set breakpoints. The “debugger;” line worked of course. But there’s another way.
In the Resource tab I searched for a certain word I know I only have in my plugin. This showed the main.js from my plugin, which I could then open and set breakpoints.
As to invoking, I found out that I can execute commands in the console. From the API I learned that there was a perfomAction method in the Editor class. I could not invoke this by typing Editor.performAction() however. I figured maybe I’m in the context of Editor anyway and used this.performAction() which worked.
So now I only need to provide the function of how I named this plugin. I looked for the Extensions.addCommand function, where I define “name” and entered it. So in the console, I called this:
this.performAction(‘my name of the command’)
And it executed it. This way I didn’t need to learn how to make key bindings
So to summarize:
- Find the plugin you’re working on in the Resource tab by searching for a word within your plugin. You can then open it and set breakpoints. This is how you find your plugin in the debugger.
- Then, set a breakpoint somewhere.