Closed sevelee closed 5 years ago
I also have pycharm 2018.2.7 I changed back to it and use mayacharm 2.1.6, use mayacharm debugger and it works. So I think there is something wrong with pycharm 2018.3.5 and mayacharm 3.0.1
wont be able to look into things till the weekend, but yes newer versions of PyCharm removed the api the old version of MayaCharm uses so the 3.x versions are a complete rewrite that takes a very different approach to debugging.
Old version was hooking into the Remote Debugger of PyCharm Pro, new version is attaching to the local process directly.
I also re-install my pycharm 2018.3.1 and mayacharm 3.0.0 to test but I just won't trigger the breakpoint.. But I remember It should be work a few weeks ago, I have a memory that I used pycharm 2018.3 to debug some code.
Thanks for your contribution to this plugin 😄
yeah when i get home and take a look at it again, i might need to get you to test a few things, i only have access to older versions of maya
Fell free to contact me for any testing. I have accesss to maya 2017 and 2017+ here.
so it looks to be working in my end with Maya 2016 PyCharm 2018.3 and the 3.0.1 version of the plugin.
can you show me what your settings panel for MayaCharm looks like, as well as your interpreter setup and run Config.
also try running Run>Attach to process...
and tell me if your maya instance displays there and if it can attach that way.
test with pyCharm 2018.3.5 and maya 2018, mayaCharm 3.0.1
i can't recreate often, but i have a few times now. looks to be a bit of a race condition. where the command to execute code happens before the debugger si fully attached. noticed it only happens with simple scripts something more complex where i need to interact in maya before hitting a break point works.
so in a future version i will need to listen to see when Maya is ready, or add a longer delay(right now its 500ms)
Is there a way that I can change 500ms to a longer time locally (in my computer) so that I can have a test?
not currently, it is a hard coded value but i am looking into a better way then just waiting. Also i don't think it would solve all of your issues, since manually attaching from the run menu also does not work for you.
Well. I didn't change anything and works now. Looking for your next version to fix this. Thanks
yeah been too busy to spend any serious time on the plug-in. But for now the best work around is using Attach To Process...
waiting for that to complete then clicking run on your config.
Its happening because right after attach, a bit of python code is executed to setup PyDev
, and the code to execute in the process is running before that PyDev
setup has returned.
can see what is going on, in these 2 files MayaCharmDebugRunner.kt MayaCharmDebugProcess.kt
more or less afterConnect
gets called way to early.
being a timing issue doing a manual attach to process...
should work before running your code. The plugin adds hooks into attach to process...
so it sees Maya like a normal python process.
I get it. A little weird thing now is that sometimes the "Process finished with exit code 0 Server stopped." comes very quick so that I need to click run config very quick 😭
yeah there is some weirdness with Maya not always accepting it, when i get time i want to fix both of these issues, and make it so you can hit debug and it "just works" consistently but hard to find the time when i do primarily work with Maya or Python anymore
I will see if I have sometime to change and test this plugin on my computer 👍
Question: Having an inability to hit breakpoints also: Tried multiple versions of PyCharm and MayaCharm based on combinations that people have reported success with and haven't been having much luck. Running Maya 2018.5 (and wondering if its the culprit?)
If the console reports the Server stopped, when manually attaching to a Maya Process, that would mean that debug won't work? (noob to IDE's)
I also have pycharm 2018.2.7 I changed back to it and use mayacharm 2.1.6, use mayacharm debugger and it works. So I think there is something wrong with pycharm 2018.3.5 and mayacharm 3.0.1
I can confirm this works for me as well. Whew. I'm pretty new to all of this, so it's nice to have a working set up at least. Very useful plugin, hopefully a fix can be made with out to much trouble at some point.
this issue seems mostly tied to a race condition and only happens when debugging via a run configuration.
for now i am removing support for attaching the debugger via run config and just letting people do it manually via Run/Attach to Process...
since it is more consistent and does not have the Maya code execute too early
pycharm version: 2018.3 mayacharm version: 3.0.1 maya version: 2018
I can execute file to maya var run/debug configurations in pycharm. But breakpoint just not work. The breakpoints won't trigger. I comes with: