From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id B1B1E7F0F9 for ; Wed, 25 Nov 2015 17:04:43 +0100 (CET) IronPort-PHdr: 9a23:uDkCchFwBbB8vHgNIXnQJJ1GYnF86YWxBRYc798ds5kLTJ75pMmwAkXT6L1XgUPTWs2DsrQf27eQ7PCrCTBIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/niqbtq9aDP01hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv50IbaKvdK09SflcDS86G2Ez/szi8xfZHiWV4X5JeWUflFJuDA+NuBr6V5G3tCT97LAlgwGVOMT3SfY/XjH0vPQjcwPhlCpSb21xy2rQkMEl1K8= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=chan.ngo2203@gmail.com; spf=Pass smtp.mailfrom=chan.ngo2203@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f53.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of chan.ngo2203@gmail.com) identity=pra; client-ip=74.125.82.53; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="chan.ngo2203@gmail.com"; x-sender="chan.ngo2203@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of chan.ngo2203@gmail.com designates 74.125.82.53 as permitted sender) identity=mailfrom; client-ip=74.125.82.53; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="chan.ngo2203@gmail.com"; x-sender="chan.ngo2203@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wm0-f53.google.com) identity=helo; client-ip=74.125.82.53; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="chan.ngo2203@gmail.com"; x-sender="postmaster@mail-wm0-f53.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AkAAAa21VWlDVSfUpehH2tEocJiikBDYFmhg8CgUA4FAEBAQEBAQEBEAEBAQEHCwsJHzCCLYIIAQEEEiYIARscAgMMBgULDQkWDwkDAgECARERAQUBHBMIAQEeh3YBAxIFn3+BMT4xjTKCeYYCChknDVaEFgEBAQEGAgEaAQUOi0SFJ4QSAQSWUAeNNYkQEJFxNoEXHwEBgkYNFgeBV3GFLAEBAQ X-IPAS-Result: A0AkAAAa21VWlDVSfUpehH2tEocJiikBDYFmhg8CgUA4FAEBAQEBAQEBEAEBAQEHCwsJHzCCLYIIAQEEEiYIARscAgMMBgULDQkWDwkDAgECARERAQUBHBMIAQEeh3YBAxIFn3+BMT4xjTKCeYYCChknDVaEFgEBAQEGAgEaAQUOi0SFJ4QSAQSWUAeNNYkQEJFxNoEXHwEBgkYNFgeBV3GFLAEBAQ X-IronPort-AV: E=Sophos;i="5.20,343,1444687200"; d="scan'208";a="155112820" Received: from mail-wm0-f53.google.com ([74.125.82.53]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 25 Nov 2015 17:04:42 +0100 Received: by wmww144 with SMTP id w144so186157926wmw.1 for ; Wed, 25 Nov 2015 08:04:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=oLyCWD+3RyoFel8vNfSjLudqPlFNgc40Xvhi7TXOQbQ=; b=Iz/ysF3UTCrYnGkE+oq1yXYcuUqfko+tiJ2Z5Qg6w+jBKcT/Bq7MxCkG3JU0jeonRk n5GItz6LcZtvmSc87QyYHlHMKP2CTUEgdBdV81cM6KWsNisaFVeEUXDx9Sk4cv9pJ7/z rkvG7Q5fkopORjYdCrEzmzEEFpgzw91RgA5RkMKLRIhqnZueFn9ZlOd4jaiYOwz0zeUA DzrVdTjq5i2yWe14dVlST4c+bKE4LFtN4gAtfyXmGv/TUIWzlVgf1Lfp+35k8CLHPJX1 XCDWWQ4LZh/tSQzhEl41hw/lOQvOQXgAnTy69UJQh2cm1fkLMBIT8jaFpUNGjCoOJtHs uTzg== X-Received: by 10.28.188.198 with SMTP id m189mr5268581wmf.81.1448467482538; Wed, 25 Nov 2015 08:04:42 -0800 (PST) Received: from [131.254.11.144] (cafehanoi.irisa.fr. [131.254.11.144]) by smtp.gmail.com with ESMTPSA id m4sm2077717wjz.31.2015.11.25.08.04.41 for (version=TLSv1/SSLv3 cipher=OTHER); Wed, 25 Nov 2015 08:04:41 -0800 (PST) To: caml-list@inria.fr References: <5655AE66.6000307@coherentgraphics.co.uk> <1448465264.23576.11.camel@e130.lan.sumadev.de> From: Chan Ngo Message-ID: <5655DC17.9070705@gmail.com> Date: Wed, 25 Nov 2015 17:04:39 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1448465264.23576.11.camel@e130.lan.sumadev.de> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Do you use a debugger with OCaml? If not, why not? On 11/25/2015 04:27 PM, Gerd Stolpmann wrote: > 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. Now, for OCaml development, I often use the printing method than ocamldebuger. I hope that some IDE can support debugging OCaml programs in near future. Chan > > Gerd