From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 68E26BB81 for ; Wed, 7 Dec 2005 14:10:43 +0100 (CET) Received: from zaphod.lost-oasis.net (zaphod.lost-oasis.net [212.85.153.18]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jB7DAhST014854 for ; Wed, 7 Dec 2005 14:10:43 +0100 Received: from www-data by zaphod.lost-oasis.net with local (Exim 3.36 #1 (Debian)) id 1Ejz4F-0002yY-00 for ; Wed, 07 Dec 2005 14:10:43 +0100 Received: from 132.166.133.216 (SquirrelMail authenticated user basile@starynkevitch.net) by panel.lost-oasis.net with HTTP; Wed, 7 Dec 2005 14:10:42 +0100 (CET) Message-ID: <46447.132.166.133.216.1133961042.squirrel@panel.lost-oasis.net> In-Reply-To: <33719.132.166.133.216.1133948065.squirrel@panel.lost-oasis.net> References: <33719.132.166.133.216.1133948065.squirrel@panel.lost-oasis.net> Date: Wed, 7 Dec 2005 14:10:42 +0100 (CET) Subject: Re: [Caml-list] [remote?] debugging CGIs? From: "Basile STARYNKEVITCH" To: caml-list@yquem.inria.fr User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at nez-perce with ID 4396DF53.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 debugging:01 basile:01 basile:01 debugging:01 gerd:01 stolpmann:01 debugger:01 ocamldebug:01 debugger:01 gerd:01 minor:01 chmod:01 ocaml:01 byterun:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 > Any hints, in particular in how to use practically the remote debugging > ability, is appreciated. Thanks. A big thanks to Gerd Stolpmann who suggested me the following: - Wrap the CGI into a shell script where you set CAML_DEBUG_SOCKET, e.g. #! /bin/sh CAML_DEBUG_SOCKET=/tmp/mysock export CAML_DEBUG_SOCKET exec wrappedapp.cgi - Start the debugger: ocamldebug wrappedapp.cgi - Enter in the debugger: set loadingmode manual set socket /tmp/mysock run - Start the CGI. It contacts the debugger. Gerd also suggested to raise the browser timeout. In practice, there is a minor issue with ownership when testing with a (standard Debian/Sid installation) of Apache, since Apache run under a user (www-data) different of mine... This can be solved with a chmod a+rwx /tmp/mysock I also would like that in Ocaml (file byterun/debugger.c) the error message when debugger connection failed be more explicit (and I just sent to Xavier & Damien at INRIA a tiny patch). Thanks for all, and apologies for asking such naive questions (I rarely need to use Ocaml debugger BTW) -- Basile STARYNKEVITCH - http://starynkevitch.net/Basile/ 92340 Bourg La Reine, France