English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[remote?] debugging CGIs?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-12-07 (13:10)
From: Basile STARYNKEVITCH <basile@s...>
Subject: Re: [Caml-list] [remote?] debugging CGIs?

> 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,

  #! /bin/sh
  exec wrappedapp.cgi

- Start the debugger:

  ocamldebug wrappedapp.cgi

- Enter in the debugger:

  set loadingmode manual
  set socket /tmp/mysock

- 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

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