Debug plugins
When debugging a plugin, you will need to follow a slightly different set of steps depending on where you have made changes.
- You have only made changes to a plugin.
- You have made changes to a plugin which depend on corresponding changes to Blockly core.
Making changes to a plugin
- Run
npm installfrom the root of the blockly repo. - Navigate to your plugin's directory (e.g. `cd /packages/plugins/my-favorite-plugin).
- Run
npm startin the plugin's directory.
Making changes to a plugin and to blockly core
Sometimes when developing a plugin for blockly, you'll need to make
corresponding changes in Blockly core (/packages/blockly/). To ensure that
your plugin is able to use the changes you've made in core Blockly, you should
first build blockly.
- Run
npm cifrom the root of the blockly repo. - Run
npm run buildfrom the root of the blockly repo. - Navigate to your plugin's directory (e.g. `cd /packages/plugins/my-favorite-plugin).
- Run
npm startin the plugin's directory.
tip
If you make additional changes to Blockly core, you'll need to redo steps 2, 3, and 4.