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 JAA27492; Wed, 12 Jun 2002 09:49:54 +0200 (MET DST) 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 JAA27571 for ; Wed, 12 Jun 2002 09:49:53 +0200 (MET DST) Received: from maild.telia.com (maild.telia.com [194.22.190.101]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g5C7nqb14642 for ; Wed, 12 Jun 2002 09:49:52 +0200 (MET DST) Received: from d1o849.telia.com (d1o849.telia.com [213.66.248.241]) by maild.telia.com (8.11.6/8.11.6) with ESMTP id g5C7nqt02119 for ; Wed, 12 Jun 2002 09:49:52 +0200 (CEST) Received: from gateway (h175n2fls34o849.telia.com [217.208.235.175]) by d1o849.telia.com (8.10.2/8.10.1) with ESMTP id g5C7npH24642 for ; Wed, 12 Jun 2002 09:49:51 +0200 (CEST) From: "Mattias Waldau" To: Subject: Ocaml debugging (Was [Caml-list] Unix.file_descr -> int ???) Date: Wed, 12 Jun 2002 09:49:51 +0200 Message-ID: <005901c211e5$bbe0cc90$0900a8c0@gateway> 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, Build 10.0.3416 Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: <20020612022611.B680@max.home> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > I was trying to trace a code with some significant amount of > select'ed fds. At some point, I faced the fact that I just > have no way to "show" a descriptor value. That was a real > shock. At the moment, the bug is found and fixed deductively, > but the question remains. This raises the issue with debugging in Ocaml and printing the contents of variables. ocamldebug is very good, and if you sprinkle your code with asserts, and use the backwards stepping function, you find almost all your bugs within minutes. However, this only works if you don't use signatures and objects. Therefor, I do not use them! It would really be an improved to O'Caml if - Functions can be called in the debugger - The signatures can be by-passed (so that you can see all elements in your Set) - instance variables can be shown. I know that you can define printers for the debugger, but currently it is too clumsy. Why is this done by ocamlc (isn't it that what -g means :-)? (maybe is should be a camlp-filter, but it must be done automatically, otherwise very few will use it.) /mattias ------------------- 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/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners