Version française
Home     About     Download     Resources     Contact us    
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,
  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