Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: -- (:)
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)

92340 Bourg La Reine, France