Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #15308
| From | Paul Rubin <no.email@nospam.invalid> |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Single Step Debugging, why or why not? |
| References | <ab2c43cf-2e71-479a-8fd9-d6f385ff515d@googlegroups.com> <2012Aug31.105444@mips.complang.tuwien.ac.at> |
| Date | 2012-08-31 02:46 -0700 |
| Message-ID | <7xharjjswo.fsf@ruckus.brouhaha.com> (permalink) |
| Organization | Nightsong/Fort GNOX |
anton@mips.complang.tuwien.ac.at (Anton Ertl) writes: > Disadvantage: You can waste a lot of time for stepping through the > program and checking at many steps whether the state is still as > intended. That is not the way to do it. Identify something that has gone wrong (like x has somehow been set to 5 when it should be zero), then set either a watchpoint on x or a conditional breakpoint on something that might set x, then run the program til x gets set to 5. If it's still not obvious where the bug is, find some other wrong data in the image and set more conditional breakpoints to see how it got that way. If your debugger can run code backwards, that's great. Otherwise you have to re-run the code multiple times, but that's not too bad if the bug is reproduceable. For intermittent bugs, debuggers are even more valuable, since you set conditional breakpoints where things can go wrong, and you can examine and modify the complete contents of memory when the breakpoint is reached. The bug may not occur often enough for repeatedly inserting trace messages (~~) to catch the bug anytime soon.
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Single Step Debugging, why or why not? Jason Damisch <jasondamisch@yahoo.com> - 2012-08-30 11:27 -0700
Re: Single Step Debugging, why or why not? "Elizabeth D. Rather" <erather@forth.com> - 2012-08-30 08:42 -1000
Single Step Debugging, why or why not? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-08-30 14:37 -0700
Re: Single Step Debugging, why or why not? "Elizabeth D. Rather" <erather@forth.com> - 2012-08-30 14:26 -1000
Re: Single Step Debugging, why or why not? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-08-31 02:25 -0700
Re: Single Step Debugging, why or why not? "Elizabeth D. Rather" <erather@forth.com> - 2012-08-31 08:18 -1000
Re: Single Step Debugging, why or why not? Paul Rubin <no.email@nospam.invalid> - 2012-08-30 18:48 -0700
Re: Single Step Debugging, why or why not? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-08-31 02:12 -0700
Re: Single Step Debugging, why or why not? anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2012-08-31 08:54 +0000
Re: Single Step Debugging, why or why not? Paul Rubin <no.email@nospam.invalid> - 2012-08-31 02:46 -0700
Re: Single Step Debugging, why or why not? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-08-31 05:56 -0500
Re: Single Step Debugging, why or why not? Paul Rubin <no.email@nospam.invalid> - 2012-08-31 09:10 -0700
Re: Single Step Debugging, why or why not? Andrew Haley <andrew29@littlepinkcloud.invalid> - 2012-08-31 11:33 -0500
Re: Single Step Debugging, why or why not? Mark Wills <markrobertwills@yahoo.co.uk> - 2012-08-31 12:51 -0700
Re: Single Step Debugging, why or why not? Coos Haak <chforth@hccnet.nl> - 2012-08-31 23:23 +0200
Re: Single Step Debugging, why or why not? Paul Rubin <no.email@nospam.invalid> - 2012-08-31 15:42 -0700
Re: Single Step Debugging, why or why not? Bernd Paysan <bernd.paysan@gmx.de> - 2012-09-01 01:52 +0200
Re: Single Step Debugging, why or why not? Paul Rubin <no.email@nospam.invalid> - 2012-09-01 17:41 -0700
Re: Single Step Debugging, why or why not? Gerry Jackson <gerry@jackson9000.fsnet.co.uk> - 2012-08-31 17:54 +0100
Re: Single Step Debugging, why or why not? "Elizabeth D. Rather" <erather@forth.com> - 2012-08-31 08:22 -1000
Re: Single Step Debugging, why or why not? "Ed" <invalid@nospam.com> - 2012-09-03 22:15 +1000
csiph-web