Am Mittwoch, den 25.11.2015, 08:23 -0500 schrieb Ivan Gotovchits: > The use of a debugger usually indicates that a programmer lost a > control of its own program and has no idea whats going on. > If a programmer doesn't own a program, and tries to understand > existing program, written by someone else, then it means to me, > that the program is written so poorly, that it is too hard to recover > its semantics by reading its source code representation. That's a little bit too hard. Actually, I like one aspect of the debugger, namely that you can easily print deeply nested values. This is also very helpful for exploring a well-written existing program. (And it would even be more helpful if the debugger could look through abstractions.) Actually, I recently used that for writing unit tests for a complex algebraic transformation (developed by myself). Just create some input for the transformation, run it, fire up the debugger, and stop the test at the point where the transformation call returns. Then check whether you like the result by printing it in the debugger, and if so, develop a check that matches against the expected pattern. (You could also do this with the toploop, but using the debugger is easier when you have a closed executable.) That said, I also prefer the printf method for debugging program flow issues. Gerd -- ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------