How To Debug Python Variables

How do you debug python variables in the view port during gameplay?

you just print them and they will show up in the command prompt of blender… so for example:

n = 1673

print n

in the command prompt it would look something like this:
1673

:wink: hope this helps

yeah but i want to see them update in real time in the viewport like logic brick varibles.

You could always make some dynamic text, and then always update it to the var you want to keep track of.

ideasman42 has provided a way to display the console right into the game engine’s viewport.
You should make an advanced search “thread started by ideasman42”.

Edit : I did it for you
New Bge Interactive console
Cheap Python console

Omg this is so awesome, how have I been living without that :S

Thanks a lot that’s a big help!

one more question: What is the proper syntax for referencing a logic brick property from one game object to another in logic bricks.

Example:

Object: Bear ---- Bear’s Property “Size”: 10
Object: Snail ---- Snail’s Property “SlimeFactor”: 1

I want an Property IPO to play on the Snail by referencing the bear’s size property of 10.

So when I’m in the IPO Actuator and it says PropertyName: What do I put there?

OBBear.Size?

thanks again

Thanks a lot that’s a big help!

one more question: What is the proper syntax for referencing a logic brick property from one game object to another in logic bricks.

Example:

Object: Bear ---- Bear’s Property “Size”: 10
Object: Snail ---- Snail’s Property “SlimeFactor”: 1

I want an Property IPO to play on the Snail by referencing the bear’s size property of 10.

So when I’m in the IPO Actuator and it says PropertyName: What do I put there?

OBBear.Size?

thanks again

is it that complicated? where the knowledge is so uncommon?