Add print statements to your code outputting the function or method name being used.
Check between which functions the messages are produced. Concentrate on that area and adding more print statements until you're pretty certain you are close enough to know where to add a debugstop. When stopped press the debugstep button.
Keep checking the background window and check when the wx messages are displayed. Reset the debugstop so it is closer to the error and then use the step-in and check whether it is from another module.
Check between which functions the messages are produced. Concentrate on that area and adding more print statements until you're pretty certain you are close enough to know where to add a debugstop. When stopped press the debugstep button.
Keep checking the background window and check when the wx messages are displayed. Reset the debugstop so it is closer to the error and then use the step-in and check whether it is from another module.