in reply to Debugger weirdness

Make and use a copy of the problematic module under a different name, then start stripping stuff out of it until you can identify what causes the problem.