From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA01776; Sat, 10 Nov 2001 14:39:58 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA01666 for ; Sat, 10 Nov 2001 14:39:57 +0100 (MET) Received: from maila.telia.com (maila.telia.com [194.22.194.231]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id fAADdvn09255 for ; Sat, 10 Nov 2001 14:39:57 +0100 (MET) Received: from d1o849.telia.com (d1o849.telia.com [213.66.248.241]) by maila.telia.com (8.11.6/8.11.6) with ESMTP id fAADduC04685; Sat, 10 Nov 2001 14:39:56 +0100 (CET) Received: from gateway (h225n2fls34o849.telia.com [217.208.235.225]) by d1o849.telia.com (8.10.2/8.10.1) with SMTP id fAADdta03613; Sat, 10 Nov 2001 14:39:56 +0100 (CET) From: "Mattias Waldau" To: "Chris Hecker" , Subject: RE: [Caml-list] debugger backtracking/checkpoints Date: Sat, 10 Nov 2001 14:39:56 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I use a debugger at least once a day. I cannot understand people who put print-statements into their programs to find bugs (JSP-people still do it this way). The problem I normally have with a debugger is go find the location where the problem is. Setting a breakpoint isn't a good option, since normally it is difficult to find the location. (If this is the only option, very often you have to set breakpoints earlier and earlier until you are ahead of the bug, so that you can step and see whats happening.) The reversible debugger solves all these problems. Normally, my bugs results in an assert-exception, so I just run under ocamldebug, and step backwards over the buggy code until I found the error. Essentially this means that even in bigger programs I find the bug and fix it within a couple of minutes. Debugging using the toplevel doesn't work for me. My programs are too big, and it is hard to run internal parts standalone. It works for finding bugs in libraries and similar. So my guidelines for a developer using Ocaml is to - use assert a lot so that you detect errors - find the bugs by running until you get the assert-exception and step backwards. The debugging feature I am missing in Ocaml is - easy way of showing all the variables in the stack frame /mattias P.s. I still cannot use ocamldebug under emacs (M-x camldebug) on Windows 2000/XP. I get 'Unknown option -emacs.'. I have to run it in the shell. Does it work for everyone else? > -----Original Message----- > From: owner-caml-list@pauillac.inria.fr > [mailto:owner-caml-list@pauillac.inria.fr]On Behalf Of Chris Hecker > Sent: Wednesday, November 07, 2001 9:12 PM > To: caml-list@inria.fr > Subject: [Caml-list] debugger backtracking/checkpoints > > > > > but disagree with the claim itself. Ocaml's debugger is in one respect > > extremely advanced: it is a reversible debugger, which puts it way ahead > > of most languages' debuggers, imperative or not. It is in one other > > Since the debugger doesn't work on msvc builds, I haven't used it > much, but do people find the backtracking thing useful in everyday > debugging? > > Chris > > ------------------- > Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: > http://caml.inria.fr/FAQ/ > To unsubscribe, mail caml-list-request@inria.fr Archives: > http://caml.inria.fr ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr