You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Invalidate the syntax in debugging.py, e.g. by adding invalid_syntax somewhere within the file.
Run the script again.
Now the script runs as if debugging.py had not changed. More annoyingly, in order to fix bugs in submodules I need to restart Ghidra every time I make a change. I have observed a more expected behaviour before I installed Ghidrathon.
Setup: Windows 10, Ghidra 11.0.3, Ghidration 4.0.0, Python 3.12
Thanks in advance for looking at this!
The text was updated successfully, but these errors were encountered:
Thank you for reaching out @jonschz ! This an expected behavior resulting from Ghidrathon's use of Jep's shared interpreters where Python modules are imported once and exist for the life of the Ghidra (Java) process. We are required to do this in order for Ghidrathon to properly run CPython extensions (more discussion on this topic found in Jep's documentation).
For development, where imported modules may frequently change, you can use Python's importlib.reload to force affected modules to be reloaded without needing to restart your Ghidra process. You should be able to call this from Ghidrathon's interpreter window and see the module reloaded (and changes reflected) for subsequent script executions using Ghidra's script manager.
Thank you for your response! In that case, would it make sense to update the documentation / README with a short explanation and/or example? I was mostly surprised that stock Ghidra behaves differently.
That's a good idea @jonschz , I'll update this issue to reflect adding documentation to describe this functionality.
mike-hunhoff
changed the title
Dependent files are not reloaded on changes
doc: Python modules are imported once and exist for the lifetime of your Ghidra process
May 21, 2024
Hello,
sorry if this is a beginner question, but this looks like a bug to me.
Steps to reproduce:
example.py
.ghidra_utils
) and create a file in there, e.g.debugging.py
.debugging.py
, e.g. by addinginvalid_syntax
somewhere within the file.Now the script runs as if
debugging.py
had not changed. More annoyingly, in order to fix bugs in submodules I need to restart Ghidra every time I make a change. I have observed a more expected behaviour before I installed Ghidrathon.Setup: Windows 10, Ghidra 11.0.3, Ghidration 4.0.0, Python 3.12
Thanks in advance for looking at this!
The text was updated successfully, but these errors were encountered: