-
Notifications
You must be signed in to change notification settings - Fork 88
Added support for Cursor and fixes #42 #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
mrexodia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cannot be merged as-is.
| wanted_hotkey = "Ctrl-Shift-I" | ||
|
|
||
| def init(self): | ||
| settings_version, ida_version = get_python_versions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not remove this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I will put it back but I don't follow when the code is useful. Why can't the plugin use the Python that IDA has access to?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Python version IDA uses might not match whatever is in the settings, so this needs to be detected.
ida/idacode_utils/settings.py
Outdated
| DEBUG_PORT = 7066 | ||
| ALLOW_UNSAFE_ORIGIN = False | ||
| LOGGING = True | ||
| SCRIPT_DIR = r"E:\backup\tools\Debug\IDA_scripts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is hardcoded to your environment, remove any logic related to this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ops! My bad, I will fix this
|
|
||
| if message["event"] == "set_workspace": | ||
| path = message["path"] | ||
| path = message.get("path", settings.SCRIPT_DIR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no meaningful default, why is this code here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor never sends any path (at least not for me) I fallback to the settings.py. If settings.py is not set (it should be set when the plugin is installed) then we fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps the extension code needs to be updated, or fixed on Cursor's side then? Hardcoding the script path isn't an acceptable solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it went from "always crashing" to "at least work if the user sets the setting".
I found the plugin from https://youtu.be/RtkHMWBz3R0?t=391 where at 6:34 the streamer also had problems with the plugin so I did a small fix for this crash.
|
I have made the changes you requsted. |
Added code to make it work in Cursor