Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

The C modest god

My genius debugging idea

This topic is 5277 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

You can even have it for free. Why not the debugger saves the last couple of states of the run time application. So you will be able to take a few steps backward in the debug mode.

Share this post


Link to post
Share on other sites
Advertisement
That would effectively require a breakpoint at every line in the program (so it can be stopped and it''s state saved). So your program would run really slowly, and why would you want to step back anyway?

Share this post


Link to post
Share on other sites
quote:
Original post by Monder
That would effectively require a breakpoint at every line in the program (so it can be stopped and it''s state saved). So your program would run really slowly, and why would you want to step back anyway?

To deal with run time errors, which you cannot predict when exactly they will happen.

Share this post


Link to post
Share on other sites
quote:
Original post by Monder
That would effectively require a breakpoint at every line in the program (so it can be stopped and it''s state saved). So your program would run really slowly, and why would you want to step back anyway?

To deal with run time errors, which you cannot predict when exactly they will happen.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Yawn, why not do what everyone else does, run it under a debugger until it crashes, then place a BP a few lines back to observe what happens...

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Yawn, why not do what everyone else does, run it under a debugger until it crashes, then place a BP a few lines back to observe what happens...

Because you have a segment of code that runs fine a 1000 times and only at the 1001 time it crashes.
So placing a breakpoint in that segment will stop the debugger only at the first time you enter that segment.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Yawn, why not do what everyone else does, run it under a debugger until it crashes, then place a BP a few lines back to observe what happens...

Because you have a segment of code that runs fine a 1000 times and only at the 1001 time it crashes.
So placing a breakpoint in that segment will stop the debugger only at the first time you enter that segment.

Share this post


Link to post
Share on other sites
With Visual C++ .NET if you run an application which then generates a run-time error like a memory-access violation error it will give you the option to debug the program and will show you the exact line in the source which generated the error. If the program is not one of your own then this isn't particulary helpful but it is extremely useful when it's your own game/app.

EDIT: dam typos

[edited by - Spudder on March 7, 2004 11:58:28 AM]

Share this post


Link to post
Share on other sites
.net only does that when the the applicaiton is set in debug mode otherwise it just throws an error the application unravels until a memory or other voilation is displayed to the user.

Share this post


Link to post
Share on other sites
You can do this with continuations, but I''ve never seen it in C++, nor do I think we will ever. Several functional languages can do it.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!