[wxPython] debugging wxWindows-2.2.6 and wxPython-2.2.5

Hello,

I recently modified the *.i (core only) of wxPython-2.2.5

intending to make it work with a wxWindow-2.2.6

that’s compiled with wxUSE_UNICODE set.

The purpose is to arrive at a wxPython

that is able to display special language characters.

It compiles/links without much complaining.

The bombs demo of the wxWindows-2.2.6 and

a homebrew simple unicode wxWindows-2.2.6 program

are running successful, so I guess
that this side is fine.

I compiled wxPython-2.2.5 as well as wxWindows-2.2.6 with HYBRID=1.

The Python I use is ActiveState’s-2.1.0-210.

The platform is W2k with VC++ V6.

Of course the wxPython-2.2.5’s demo/demo.py crashes.

So I tried this minimalistic script from within this demo directory:

from wxPython.wx import *

class TstApp(wxApp) :
def OnInit(self):
f = wxDialog(None, -1, “Try”)
b = wxButton(f, 1, u"\u304BTest", wxPoint(20, 20))
f.ShowModal()
f.Destroy()
return true;

“python tst.py” returns to the prompt after one second

and did not show/do a damn thing.

Now my the question:

How do I make the debugger pop in so that I can verify what goes on?

Could somebody, doing this kind of wxPython development,

explain me how he/she sets up the development environment?

How do I set break points for instance?

Can somebody give me some debugging hits?

(when explaining me things please be aware that I do not know the

inners of python, wxwindows and SWIG. I mean: do not suppose I

can talk at your level, I’m just for about one week into this thing)

Thanks in advance!

Kind regards,

francis

Now my the question:
How do I make the debugger pop in so that I can verify what goes on?
Could somebody, doing this kind of wxPython development,
explain me how he/she sets up the development environment?
How do I set break points for instance?
Can somebody give me some debugging hits?

I setup a special MSVC project for debugging. I just use the "Makefile"
project type since I don't actually build in MSVC, and then I go to the
project's settings and click the debug tab. Then enter the full path to
wherever python_d.exe (if DEBUG) or python.exe (if HYBRID) is at, and set
the working directory to where the python script is at and set parameters to
the name of the Python script. At the top of this page is a combobox,
select the "Additional DLLs" category and enter all the *_d.pyd (if DEBUG)
or *.pyd (if HYBRID) files in the wxPython package directory.

Once that is done you should be able to set breakpoints (using F9) in any of
the wxPython or wxWindows code, and hit F5 to run your test app.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!