From 31165bf2cba75f3ab58fefce10e707bbaadcc125 Mon Sep 17 00:00:00 2001 From: Jordan Wiens Date: Wed, 2 Dec 2020 15:35:41 -0500 Subject: update documentation on reloading plugins --- docs/guide/plugins.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'docs/guide') diff --git a/docs/guide/plugins.md b/docs/guide/plugins.md index 452802d3..e71266de 100644 --- a/docs/guide/plugins.md +++ b/docs/guide/plugins.md @@ -137,7 +137,15 @@ The second and more powerful (but more complicated) mechanism is to leverage the It's useful to be able to reload your plugin during testing. On the Commercial edition of Binary Ninja, this is easily accomplished with a stand-alone headless install using `import binaryninja` after [installing the API]. (install_api.py is included in every install in the installation folder) -For the Personal edition, we recommend simply commenting out the `register_` function normally used to register the plugin via whatever mechanism it uses and instead simply using the built-in Python console along with the python `reload` function to load new changes and test them by directly calling functions in the module. This work-around unfortunately is not supported for Binary View or Architecture plugins which unfortunately do require a restart to test if not running on Commercial. +For other plugins, we recommend the following workflow from the scripting console which enables easy iteration and testing: + +```python +import pluginname +import importlib +importlib.reload(pluginname);pluginname.callbackmethod(bv) +``` + +Then just `[UP] [ENTER]` to trigger the reload when the plugin has changed. [PluginManager API]: https://api.binary.ninja/binaryninja.pluginmanager-module.html [example]: https://github.com/Vector35/binaryninja-api/tree/dev/python/examples -- cgit v1.3.1