Sign in to follow this  
Thunder_Hawk

Using Turbo Debugger to debug faulty input

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.


??

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this