GBOPOLY1@NUSVM.BITNET (fclim) (10/13/88)
debug is a wonderful tool to have; it had helped me a lot in
developing many programs. however, i feel that there are 4 areas
in which it can be improved upon. i am borrowing these ideas from
the microsoft codeview(tm) debugger.
(1) /com/debug should have a watch facility. when i put a watch
on the variable foo, a new pane will be created. the value of
foo will be displayed in this pane. when foo is re-assigned,
the watch pane will be refreshed to show the current value of
foo.
(2) i can't remember what microsoft call this one; it's akin to
watch. basically, the debugger will "go" until a condition
become true; then it go back into interactive mode.
currently, /com/debug only allow breakpoints. but, suppose
i have a long while loop with the header
while (foo == 'n') {
....
}
this means i have to look for the line number after the }
in order to put a breakpoint there. this line may be a few
pages down from the current page.
i think it would simpler if we have the /com/debug command
go until foo != 'n'
this way i can skip the while loop which i know is bug-free.
(3) if my code contain
char *foo;
...
foo = getpass("passwd: ");
then i can't do things like print foo. it will print the
address of foo and not the contents.
the way out now is either
print foo(:0:), foo(:1:), foo(:2:), ...
(oops, my keyboard hasn't any square brackets).
or
char foo(:16:);
....
strcpy(foo, getpass("passwd: "));
(4) if i issue the debug command
e foo, bar
it will print the values of foo and bar on two separate lines.
i like to issue commands like
print "foo = %d, bar = %d\n", foo, bar
this will only take up one line in the debug transcript pane.
i hope the new release of /com/debug will incorporate these features;
especially the first 3.
fclim --- gbopoly1 % nusvm.bitnet @ cunyvm.cuny.edu
computer centre
singapore polytechnic
dover road
singapore 0513.