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 C43807F0F9 for ; Thu, 26 Nov 2015 11:11:39 +0100 (CET) IronPort-PHdr: 9a23:KYm9DRJUZpG7HXGr2tmcpTZWNBhigK39O0sv0rFitYgUIvvxwZ3uMQTl6Ol3ixeRBMOAu68C27Kd6/6ocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC0oLnj6vqpdX6WEZhunmUWftKNhK4rAHc5IE9oLBJDeIP8CbPuWZCYO9MxGlldhq5lhf44dqsrtY4q3wD89pozcNLUL37cqIkVvQYSW1+ayFmrPHs4DvETQ3H2XsdTmQQnQZPBUCR7hb6WL/6tSv3rOd7xCaANNX2TLsvHz+lqbpoHkzGkiACYhsw9GrQjsk4qatHqRairlQrxovdfIiRN/NWcabUfNdcTm1ECJUCHxddC5+xOtNcR9EKOvxV+syk/wMD Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=mmatalka@gmail.com; spf=Pass smtp.mailfrom=mmatalka@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f47.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of mmatalka@gmail.com) identity=pra; client-ip=74.125.82.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of mmatalka@gmail.com designates 74.125.82.47 as permitted sender) identity=mailfrom; client-ip=74.125.82.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="mmatalka@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-f47.google.com) identity=helo; client-ip=74.125.82.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="mmatalka@gmail.com"; x-sender="postmaster@mail-wm0-f47.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CHAADS2VZWmy9SfUpehA5vs16MGx2FcgKBOTsRAQEBAQEBAQEQAQEBAQEGCwsJIS6CLYIIAQEDARIuARsdAQMBCwYFBwQWJQ8BBA8RAQUBIhMih3YBAwoIBAGgA4ExPjGNMoJ5hhkKGScNVoQNAQEBAQEBBAEBAQEBAQEWAQUOhDaCEIR+iTkFlleFKGmHJIFcSYZrj1yCJTaBFzeCMA0WB4FWcoVgAQEB X-IPAS-Result: A0CHAADS2VZWmy9SfUpehA5vs16MGx2FcgKBOTsRAQEBAQEBAQEQAQEBAQEGCwsJIS6CLYIIAQEDARIuARsdAQMBCwYFBwQWJQ8BBA8RAQUBIhMih3YBAwoIBAGgA4ExPjGNMoJ5hhkKGScNVoQNAQEBAQEBBAEBAQEBAQEWAQUOhDaCEIR+iTkFlleFKGmHJIFcSYZrj1yCJTaBFzeCMA0WB4FWcoVgAQEB X-IronPort-AV: E=Sophos;i="5.20,346,1444687200"; d="scan'208";a="155195216" Received: from mail-wm0-f47.google.com ([74.125.82.47]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 26 Nov 2015 11:11:38 +0100 Received: by wmww144 with SMTP id w144so14901658wmw.1 for ; Thu, 26 Nov 2015 02:11:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=jthaI6u0Ygs7RiufVcOW69AFR8bQ6Tt/dmOirROifjM=; b=vuDYQaeRbm7Ns/dc+jw1Okv18B71XBTcn7bV0q/jTBZKyifDwDDVpehW+16iJGVy/X qdkcfrw7FxZuZZgAKVJWvB8SH/pxiK2ppqi07oaBd4skuZ/vA3HKRkrErRq7Fb57BN6C aTAU3JPZE/yngeoWjulaM+9AaKTcnrZmLvWhcZkgrl/6/5mdI7WhN7TyfHHn+Xe4267F 11wiWT40DXRqZNuhklk9F3vEpKnWqy18Dt6tL0TqSZ+xEOmSCRobDVBOpWfvB+HiYkF7 eqHCXHA8+BX62JxRH2ccdV7I6VVdy1hmZElEWzJNpRxvVZMETFJ28lKhJvo8/kR5j7Eh /aUg== X-Received: by 10.28.57.215 with SMTP id g206mr2819387wma.82.1448532698512; Thu, 26 Nov 2015 02:11:38 -0800 (PST) Received: from localhost (li195-236.members.linode.com. [178.79.139.236]) by smtp.gmail.com with ESMTPSA id h67sm1928640wmf.17.2015.11.26.02.11.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 26 Nov 2015 02:11:37 -0800 (PST) From: Malcolm Matalka To: John Whitington Cc: "caml-list\@inria.fr" References: <5655AE66.6000307@coherentgraphics.co.uk> Date: Thu, 26 Nov 2015 10:11:35 +0000 In-Reply-To: <5655AE66.6000307@coherentgraphics.co.uk> (John Whitington's message of "Wed, 25 Nov 2015 12:49:42 +0000") Message-ID: <86k2p5nk88.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] Do you use a debugger with OCaml? If not, why not? John Whitington writes: > Hi, > > Like, I suspect, many people, my method has always been to insert Printfs, and stare at code until I find the problem. In fact, the > ocaml.org page on ocamldebug says: > > "In fact, for complex programs, it is likely the case that the programmer will use explicit printing to find the bugs, since this > methodology allows the reduction of the trace material: only useful data are printed and special purpose formats are more suited to get the > relevant information, than what can be output automatically by the generic pretty-printer used by the trace mechanism." > > So, I ask: What do you use for debugging small and large OCaml programs? If not a debugger, why not? What problems prevent it? How does your > debugging process differ when writing OCaml compared with other > languages you use? I do not use a debugger, but I think it's mostly due to ignorance. I just don't know how to use a debugger effectively in any language. That being said, I write a lot of asynchronous code which I have found difficult to use a debugger in pretty much any language other than Erlang. Also, if something weird is happening in an place I don't expect, I often try to hoist that up to the type system which can, with discipline, inform me of when I was forgetting to handle a situation. > > John > > -- > John Whitington > Director, Coherent Graphics Ltd > http://www.coherentpdf.com/