If we extract the tool logic code from the UI part of the tool, we can hot reload the logic without closing the interface.
This approach is suitable for independent methods and modules.
Add a temporary button in the development of the tool for reloading logic is also very convenient.
{
"SButton": {
"Text": "Reload",
"HAlign": "Center",
"VAlign": "Center",
"OnClick": "import your_utils, importlib; importlib.reload(your_utils)"
}
},
...
If code that involves both the logic part and the ui, we can use this method to update the logic when reopening the tool.