Noobish question about debugging and python

I’m making a little game with Panda3D with the power of Python, and the problem is:
How do i know what makes the engine crash?

Is there any file that points to the error in my python scripts?

Look here.

Also make sure you run your python script from a terminal. This includes windows as well.

If you find it too complicated to cd to your game dir every time, you can use this bat file on windows:

@echo off
echo.Starting Game

It assumes your lies in the same directory as this bat file. the ‘pause’ on the end lets you read through all output before the terminal closes.

If you are not a windows user, then shame on you if you don’t use a terminal by yourself :smiley:

Or at first lines of you staring script you can redirect messages to files:

sys.stdout = open("report.txt", "w")
sys.stderr = open("errors.txt", "w")

also google for python bulit in debugger “pdb” it’s really cool