-
Notifications
You must be signed in to change notification settings - Fork 11
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
Breakpoint right after pydevd.settrace call #17
Comments
Hmm. I don't think I've run into that. But I think I do have some pending fixes that I never got around to pushing. I'll check that today and get those pushed and released, and then let's see if it works for you with the new version. |
Ok thank you ! |
I just looked at the pending changes I made, and it won't have any effect on the behavior you're seeing. I just tried that myself and can reproduce the issue. I've actually ran into that before and tried to figure out what was causing it, but haven't had any success. I think it's probably something deep in the bowels of the integration of pydevd and IDEA/PyCharm. You should still be able to debug though. Just resume execution from that initial breakpoint, and it should continue as normal. |
So I've just ignored this bug untill now, when it really bothered me. I might have actually found the trick. Relative imports are important because otherwise the imported modules won't be reloaded inside Fusion360 python interpreter, and you would have to restart Fusion360 to see the changes in the imported modules. Then, still in
Notice the While this is the only way I found to make it NOT stop inside and stop_at_frame's default is supposed to be False, whereas explicitly setting it as False changes the function's behavior). |
Hmm. Do relative imports cause the module to be reloaded? I don't think that's the case? But I could be wrong. I do jump through some hoops elsewhere to ensure, e.g. the script module is reloaded. But in any case, I'll give it a shot, and merge it in if it looks like it fixes the issue. Thanks for investigating! |
This fixes issue #17, where the debugger would suspend within the attach_script.py script, on subsequent attempts to attach to fusion, after the first attach and detach. Thanks for @Bonjour123 for digging into this and suggesting the fix!
This should be fixed by 836187a. Thanks for digging into it and suggesting the fix! |
When I detach the debugger (with the stop button inside pycharm) and then attach it again (with the run/rerun button), Pycharm always brings up the following file
PyCharm2022.1\plugins\fusion_idea\lib\pydevd-1.9.0\pydevd_attach_to_process\attach_script.py
and breaks at the line
pydevd.settrace( port=port, host=host, stdoutToServer=True, stderrToServer=True, overwrite_prev_trace=True, suspend=False, trace_only_current_thread=False, patch_multiprocessing=False, )
I though that the problem was related to the line right before it:
if py_db is not None: py_db.dispose_and_kill_all_pydevd_threads(wait=False)
but I checked that
dispose_and_kill_all_pydevd_threads
is well defined, and changedwait
to True.But Pycharm still breaks right after the
pydevd.settrace
callAlso, it seems this issue is not a duplicate or related to this one
The text was updated successfully, but these errors were encountered: