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 RAA21432; Tue, 9 Sep 2003 17:58:39 +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 RAA22824 for ; Tue, 9 Sep 2003 17:58:38 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h89Fw6f12983; Tue, 9 Sep 2003 17:58:06 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA22104; Tue, 9 Sep 2003 17:58:05 +0200 (MET DST) Date: Tue, 9 Sep 2003 17:58:05 +0200 From: Xavier Leroy To: Jim Farrand Cc: caml-list@inria.fr Subject: Re: [Caml-list] OCamlRun -D? Message-ID: <20030909175805.A17898@pauillac.inria.fr> References: <20030909082447.GA2187@farrand.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20030909082447.GA2187@farrand.net>; from jim@farrand.net on Tue, Sep 09, 2003 at 09:24:47AM +0100 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 ocamlrun:01 debugger:01 ncurses:01 debugger:01 ncurses:01 externally:01 passing:01 ocamlrun:01 ocamldebug:01 myprog:01 camldebug:01 camldebug:01 myprog:01 debug:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > How can I use the ocaml debugger to debug a program that uses ncurses? > I can't run the program from inside the debugger as the mixture of > ncurses output from my program, and the non-ncurses output from the > debugger produces garbage. > > The manual seems to hint that I can run the program, and then run the > debugger externally (on a different virtual terminal), and then connect > the debugger to the program. The key to this is passing the -D > parameter to ocamlrun, as mentioned in section 16.8.6 of the manual. > Except that ocamlrun does not recognise the -D parameter. :( Yes, the manual is outdated and will be fixed. You can achieve the desired effect by setting the CAML_DEBUG_SOCKET environment variable before running the program: In terminal 1: ocamldebug myprog set loadingmode manual run (it prints a socket path, e.g. /tmp/camldebug9960) In terminal 2: CAML_DEBUG_SOCKET=/tmp/camldebug9960 myprog Hope this helps, - Xavier Leroy ------------------- 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