I got autocomplete, syntax highlighting and execution setup (I can startup stuff in Maya) but what doesn’t work is setting breakpoints.
Or rather, I can place breakpoints (double clicking next to the row numbers column) but they don’t trigger.
EDIT: Some ppl have suggested the use of PyCharm instead and sure, I don’t mind setting that up as we have a couple network licenses to spare. But I can’t find any info about how to set it up for 2016.
EDIT 2: Worth mentioning - I have setup the PyDev debug server in Eclipse and it is up and running. However, breakpoints are not triggered. I’ve even setup the debugger to use the same port as the Maya Eclipse Connect -plugin just to see what happens.
EDIT 3: Also worth mentioning. Maya needs to know where the PyDev debugger is located, so add that to PYTHONPATH in Maya.env (or in your userSetup if you prefer that)
PYTHONPATH = C:\Users\martin.dahlin.p2\pool\plugins\org.python.pydev_4.5.3.201601211913\pysrc
Naturally, this must also be specified under PyDev > Interpreters > Python Interpreters > Libraries, in Eclipse
[QUOTE=PereBalsach;29470]I´m really interested, I did setup the debugger with eclipse and pydev and I have the same problem.
I´ll have to look to pycharm option awell.[/QUOTE]
Greetings Kingster!
I’ll let you know if I get things working. But as of now, I’m still having problems with the breakpoints.
what problems are you having with setting up PyCharm for 2016? I have it working pretty good with 2015 including debugging support and running scripts in maya from PyCharm
[QUOTE=ldunham1;29480]this and this worked for me.
It was a bit of a pain but it works well enough.
Breakpoints get triggered without needing to reload, watching etc.[/QUOTE]
I’ve looked at several guides, including the ones you posted as well as this one: http://around-the-corner.typepad.com/adn/2012/10/debugging-python-in-maya-with-eclipsepydev.html
I still can’t get things working. Code gets sent to Maya but the debugger doesn’t respond at all.
Even if I get things working I’m seriously questioning whenever it’s worth it. As of now, there are way too many steps to get the debugging process starting: Open a command port in Maya, start debugger inside script editor, switch to debug perspective in eclipse, connect to maya in eclipse, start debugger, import pydevd at the top of your script and setup those pydevd.settrace() -stuff. This is bullshit tbh - not to mention the long laundry list of steps you need to go through just to setup the IDE for Maya.
[QUOTE=passerby;29478]what problems are you having with setting up PyCharm for 2016? I have it working pretty good with 2015 including debugging support and running scripts in maya from PyCharm[/QUOTE]
Because I have been busy trying to get this to work with Eclipse but also because I haven’t found a single PyCharm guide that is up-to-date.
I found this Setting up PyCharm for use with Maya 2013 - MotionBuilder - Tech-Artists.Org via Rob Galanakis guide and I started to follow it but stopped halfway into Step 2 because what’s described in the guide is simply not there in PyCharm (due to restructured UI).
Now, considering what pain in the ass it is to setup debugging for Maya dev - why not just use Python’s built-in debugger (Pdb)? 26.2. pdb — The Python Debugger — Python 2.7.18 documentation
Sure it’s simple but you can step through your code, print variables, etc - seems decent enough to me.
hmm considering i have a plugin for automating the debugging process of PyCharm, over the next week i think i will try and make a doc showing the new way to setup pycharm to work with maya to replace the old one.
also step 2 of that guide still works you just no longer need to make the symlink and can target mayapy.exe directly. The important part is removing the mayapy default site-packages from the paths in favour of the autocomplete one provided by pymel.
If you do ever want to make the leap over to PyCharm I did do an up-to-date setup for Maya including setting up Remote Debugging. I’m still using the old symlink way though but you can just point to mayapy.exe like passerby said.
[QUOTE=snolan;29510]If you do ever want to make the leap over to PyCharm I did do an up-to-date setup for Maya including setting up Remote Debugging. I’m still using the old symlink way though but you can just point to mayapy.exe like passerby said.
Cheers,
-Sean[/QUOTE]
I got this working - however I can only run debugging one time. If I click the debugging icon in PyCharm it says I have to connect again:
Waiting for process connection…
…but running
pydevd.settrace(“localhost”, port=XXXX, suspend=False)
again doesn’t setup the connection.
But if I then run
reload(pydevd)
pydevd.settrace(“localhost”, port=XXXX, suspend=False)
it does connect but Maya freezes.
EDIT:
The problem is that I run my debugging session, stop the debugger, perform some more work, start a second debugging session (starts debug in PyCharm, then I run reload(pydevd) or simply remove the module from memory and do a new import. The second time this connection is made, Maya freezes)
If you’re still considering other IDE’s still I really like Wing IDE. The setup is easy, the debugger connects to Maya without a hassle and it’s top notch. It also does code completion (even for PyMel, which is great for me, personally). I really can’t say enough good things about it.
[QUOTE=GearSpinner;29522]If you’re still considering other IDE’s still I really like Wing IDE. The setup is easy, the debugger connects to Maya without a hassle and it’s top notch. It also does code completion (even for PyMel, which is great for me, personally). I really can’t say enough good things about it.
I have considered it several times, and I’m sure the company got network licenses to spare
It’s just that it’s so damn frustrating that I -almost- got this to work in Eclipse (I could send code to Maya and execute it, but the debugger failed), then I got it to work in PyCharm (but with problems).
[QUOTE=Nightshade;29519]I got this working - however I can only run debugging one time. If I click the debugging icon in PyCharm it says I have to connect again:
Waiting for process connection…
…but running
pydevd.settrace(“localhost”, port=XXXX, suspend=False)
again doesn’t setup the connection.
But if I then run
reload(pydevd)
pydevd.settrace(“localhost”, port=XXXX, suspend=False)
it does connect but Maya freezes.
EDIT:
The problem is that I run my debugging session, stop the debugger, perform some more work, start a second debugging session (starts debug in PyCharm, then I run reload(pydevd) or simply remove the module from memory and do a new import. The second time this connection is made, Maya freezes)[/QUOTE]
Cool, glad you got it working. I tried to run mine the other day and it failed to run. Gives me a improper debugger version. Not sure why. My .egg is in the proper path. Anyways, good you got it figured out.