How to efficiently debug Python scripts in Rhino for Mac?

So I really want to get into scripting computational geometry. I tried Ruby and SketchUp but wasn’t getting somewhere I wanted to go. Rhino is different: more efficient, precise, clean, simple, minimal, and complex if you want to. I feel I could build up talent within Rhino for Mac and so I started following the 101 Python pdf file.

This works. Sometimes. Unfortunately too often I find myself in a situation where I wrote a script, it somehow fails, sometimes even Rhino entirely crashes and I get stuck. When I am lucky Rhino does return a description of my scripting error and gives a line number and than when I am lucky again I can fix it.

Too often though Rhino doesn’t give me anything or even worse things happen. So I was wondering, is there some kind of a way in which I can debug efficiently, maybe through a third party, with breakpoints, stepping in, out and over code, etc?

Can I learn how to code Python scripts, create beautiful accurate and coherent geometry, become a loyal user of Rhino while building up my talents as a young designer and starting a career with it and happiness for a lifetime!! Please! I would be so grateful :wink: Thank you!

I must add to that that in one of the occasions this happened:

I typed, as in the 101 Python for Rhino pdf:

pi = math.Pi()

and after some googling I got the script to work only when I changed this to:

pi = math.pi

So I am guessing that it is this type of mistake that I am making all over and it is occurring because Python is not working the way it did (or at least for me - on the Mac) when the pfd was written. I’d be happy to work to better this and/ or maybe there is a better way? Like more up to date tutorials?

Mind you , I am learning Python along with scripting for Rhino, which is what made the pdf so attractive. I learn code easily, but some advise would be helpful, and I am willing to contribute myself since you are busy coding the underlying acceptant program and I the whole idea is very attractive to me with Rhino in this phase.

Learning python in the current Rhino for Mac is going to be pretty frustrating. We don’t have a good solution for debugging right now.

@Alain, were you ever able to get remote debugging working on OSX? I couldn’t remember.

Thank you for your respons. I Got Komodo working with syntax checking including the Rhino libraries, so that makes some difference.

Though it is a little frustrating, the results I am getting are still way better than when using SketchUp. So I am going to pursue working in Rhino with Python further - and also without it. If I can be of any use regarding the Python workflow, please let me know! I might post my findings here from time to time when I get really stuck or when something else very significant has happened.

I have got plenty of time and passion for this going on right now, so don’t feel shy to be interested in the work I can do.

Hi @stevebear, I didn’t as I did most of my testing before I had a new mac. I will look into that.

Hello everyone.

I would like to know if there are any news regarding debugging in OS X, I’m working with Atom, and I like it a lot.

thanks in advance