caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [remote?] debugging CGIs?
@ 2005-12-07  9:34 Basile STARYNKEVITCH
  2005-12-07 13:10 ` [Caml-list] " Basile STARYNKEVITCH
  0 siblings, 1 reply; 2+ messages in thread
From: Basile STARYNKEVITCH @ 2005-12-07  9:34 UTC (permalink / raw)
  To: caml-list


Dear All,

Sorry for such a naive question....

(while debugging a Wdialog application, see the wdialog mailing list for
details)

I am debugging a CGI. However, I cannot wrap my index.cgi as
   ocamldebug index.bytecode
since ocamldebug writes its version number to stdout (not stderr)?

Any hints, in particular in how to use practically the remote debugging
ability, is appreciated. Thanks.

Regards.

-- 
Basile STARYNKEVITCH - http://starynkevitch.net/Basile/
92340 Bourg La Reine, France


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] [remote?] debugging CGIs?
  2005-12-07  9:34 [remote?] debugging CGIs? Basile STARYNKEVITCH
@ 2005-12-07 13:10 ` Basile STARYNKEVITCH
  0 siblings, 0 replies; 2+ messages in thread
From: Basile STARYNKEVITCH @ 2005-12-07 13:10 UTC (permalink / raw)
  To: caml-list



> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-12-07 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-07  9:34 [remote?] debugging CGIs? Basile STARYNKEVITCH
2005-12-07 13:10 ` [Caml-list] " Basile STARYNKEVITCH

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).