How to debug Python program with GUI (Tkinter)?

D

Davy

Hi all,

How to debug Python program with GUI, especially Tkinter? My debug
environment is PythonWin.

For example, when I single step in the program, the step will go to
mainloop() and always loop there. How can I know where the program is
processed?

Any suggestions are welcome!
Best regards,
Davy
 
D

Diez B. Roggisch

Davy said:
Hi all,

How to debug Python program with GUI, especially Tkinter? My debug
environment is PythonWin.

For example, when I single step in the program, the step will go to
mainloop() and always loop there. How can I know where the program is
processed?

You can't - the mainloop is written in C. You need to set breakpoints in the
command-handlers of your interest.

Diezv
 
N

Nir

Hi all,

How todebugPython program with GUI, especially Tkinter? Mydebug
environment is PythonWin.

For example, when I single step in the program, the step will go to
mainloop() and always loop there. How can I know where the program is
processed?

Any suggestions are welcome!
Best regards,
Davy


Try Winpdb
http://www.digitalpeers.com/pythondebugger/

With Winpdb you can pause (break into) and inspect the state of the
Python script even if it is doing some C code.

Nir
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top