caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Basile STARYNKEVITCH" <basile@starynkevitch.net>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] [remote?] debugging CGIs?
Date: Wed, 7 Dec 2005 14:10:42 +0100 (CET)	[thread overview]
Message-ID: <46447.132.166.133.216.1133961042.squirrel@panel.lost-oasis.net> (raw)
In-Reply-To: <33719.132.166.133.216.1133948065.squirrel@panel.lost-oasis.net>



> 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


      reply	other threads:[~2005-12-07 13:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-07  9:34 Basile STARYNKEVITCH
2005-12-07 13:10 ` Basile STARYNKEVITCH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46447.132.166.133.216.1133961042.squirrel@panel.lost-oasis.net \
    --to=basile@starynkevitch.net \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).