471,350 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

How to debug Python program with GUI (Tkinter)?

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
Nov 28 '07 #1
2 7126
Davy wrote:
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
Nov 28 '07 #2
Nir
On Nov 28, 11:18 am, Davy <zhushe...@gmail.comwrote:
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

Dec 5 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Gary Richardson | last post: by
3 posts views Thread by Mickel Grönroos | last post: by
6 posts views Thread by Peter Milliken | last post: by
47 posts views Thread by Kenneth McDonald | last post: by
59 posts views Thread by Kevin Walzer | last post: by
40 posts views Thread by =?iso-8859-1?B?QW5kcuk=?= | last post: by
reply views Thread by nadeemabdulhamid | last post: by
8 posts views Thread by karthikbalaguru | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.