Newb: Python error messages and debugging?

Howdy,

I am running my own first trial scripts with Alt-P from the inbuilt text editor. When something is wrong with the script, I get a pop-up error message:

“Error: Python script error, check console”

But in the console no error message appears. I am assuming that by “console” is meant the “Interactive Console” that can be opened in Blender. Sometimes, though not always, the line where the error occurs in the text file is highlighted. This is helpful - but I need to see the error message as well. Also, print statements in my script produce no output in the console – which I belive they should.

So, if anybody knows what I should do to see error messages and the output from my own script print statements – that would be great. I’m using Blender 2.45 on mac OSX, Intel.

A related issue. In the Matlab programming language, there is a command “keyboard”. When the interpreter comes to this command it halts the script and one can then interactively (in the xterm that runs matlab) access the variables of the script. When typing “return” the script continues to execute where it was halted. This is often much more efficient than printing variables from within the script when debugging.

So, is there anything similar to the matlab “keyboard” command in Blender Python?

Thankful for any help on these issues.

The console is hidden on OSX. Use Spotlight (the little blue button with the magnifying glass) to search for “console” (without the quotes). You should find an application called console, this is what you are looking for.

I don’t know of any command like that for Blender python outside of possibly using the interactive console, but I’m not even sure that thats exactly what you want.

I found a file called console.log. Double clicking this opened the necessary application.
It would have been great with a debugging command such as Matlabs “keyboard”, but at least now I’ll make do.

Thanks a lot!

I tried searching for console.log and found nothing - am using ubuntu 8.04? I am using Blender 2.46

They were talking specifically about OSX. In Ubuntu, run Blender from the command line (it will print out suff in the terminal) or check the box in properties for the “executable” which says “run in terminal”.