Using Turbo Debugger to debug faulty input

Started by
2 comments, last by Dave Hunt 19 years ago
Okay, this is a bit of a weird one... I recently discovered that on certain PCs running XP, my code to find which keys have been held since the previous frame fails randomly, making it so that you have to press and release enter with precision timing to get my menu system to work on those machines. After thoroughly searching through the simple update code and all code capable of modifying the key array, I discoverd that I could hide the bug by calling the function to update the held keys from my global update function instead of through my windowing system (aside from a stack pop for the function to return, these two positions are identical). This would imply that the real problem lies elsewhere... Using my debugger (TD32.exe) has proven fairly fruitless thus far because tracing through my code in anyway requires me to give up input from my program, preventing me from actually recreating the bug conditions. Does anyone have any idea what strategy I can use to debug my program? Keep in mind that I'm very new to using a debugger. It'll be awhile before I can test this as well because I don't have my XP machine at my disposal right now.
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________
Advertisement
what are you using to determine key states?

EDIT: huh? my rating goes down 10 points and i get a
warning level of 10%? this have something to do with
that one post? what the? i comment on an obvious flaw
in that guy's program and i get knocked for it? that
wasn't a keyboard mispelling on that guy's part. he
obviously had a second object. well i guess i'm outta
here then. c ya later.
Quote:Original post by Dead Eye
what are you using to determine key states?


Simple Win32 keydown/keyup events. However, I'm almost 100% certain that the problem is not in the keyboard checking code (I've quadruple checked the logic in a calm, well-rested state of mind), which is why I'm asking for ideas on trying to use my debugger.

Quote:Original post by Dead Eye
EDIT: huh? my rating goes down 10 points and i get a
warning level of 10%? this have something to do with
that one post? what the? i comment on an obvious flaw
in that guy's program and i get knocked for it? that
wasn't a keyboard mispelling on that guy's part. he
obviously had a second object. well i guess i'm outta
here then. c ya later.


??
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________
Debugging keyboard/mouse input issues is a bear. About the only thing I can suggest is that you create a debug log file and have your input routines write some useful information to it. Then check the log after the fact.

This topic is closed to new replies.

Advertisement