Comments (6)
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.
from fusionidea.
This should be fixed by 836187a. Thanks for digging into it and suggesting the fix!
from fusionidea.
Ok thank you !
I'll let you know if it get fixed
from fusionidea.
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.
from fusionidea.
So I've just ignored this bug untill now, when it really bothered me. I might have actually found the trick.
Copy C:\Users\[USER]\AppData\Roaming\JetBrains\PyCharm2022.1\plugins\fusion_idea\lib\pydevd-1.9.0\pydevd_attach_to_process\attach_script.py
to the location of fusion_idea_addin
This allows us to make a relative import of it inside fusion_idea_addin.py
by replacing import attach_script
by from . import attach_script
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 fusion_idea_addin.py
, inside the attach
function, replace the call to pydevd.settrace by:
pydevd.settrace(
port=port,
host=host,
stdoutToServer=True,
stderrToServer=True,
overwrite_prev_trace=True,
suspend=True,
trace_only_current_thread=False,
patch_multiprocessing=False,
stop_at_frame = False
)
Notice the suspend=True,
and stop_at_frame = False
While this is the only way I found to make it NOT stop inside attach_script.py
, this is completely incoherent with the settrace sources:
suspend=True is supposed to actually simulate a breakpoint on settrace call, whereas the contrary happens
and stop_at_frame's default is supposed to be False, whereas explicitly setting it as False changes the function's behavior).
from fusionidea.
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!
from fusionidea.
Related Issues (20)
- Only working once and without debugger HOT 9
- Exception using PyCharm 2020.1 on mac HOT 1
- Question about relative imports HOT 6
- Upload new version to jetbrains repo HOT 1
- Mac IPv6 SSDP not working HOT 3
- Fail to load plugin descriptor from file fusion_idea-0.6.2.zip in PyCharm 2021.1.2 HOT 5
- "Unhandled exception while importing and running script" HOT 8
- Mac PyCharm HOT 1
- Couldn't start ssdp server exception HOT 2
- PermissionError when executing HOT 8
- Cannot find facet in Intellij HOT 36
- Improving the startup user experience HOT 1
- Access is allowed from write thread only HOT 3
- Connection to Python debugger failed, Accept timed out HOT 10
- Documentation request HOT 4
- stdout truncated after 1000 bytes HOT 3
- Mac support HOT 92
- Plugin not working 100% with latest version Fusion 360 with python 3.7 HOT 2
- Starts with wrong interpreter HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fusionidea.