* [Caml-list] OCamlRun -D?
@ 2003-09-09 8:24 Jim Farrand
2003-09-09 15:58 ` Xavier Leroy
0 siblings, 1 reply; 2+ messages in thread
From: Jim Farrand @ 2003-09-09 8:24 UTC (permalink / raw)
To: caml-list
Sorry to those who have seen this, already, I asked on the beginners list with no reply.
How can I use the ocaml debugger to debug a program that uses ncurses?
I can't run the program from inside the debugger as the mixture of
ncurses output from my program, and the non-ncurses output from the
debugger produces garbage.
The manual seems to hint that I can run the program, and then run the
debugger externally (on a different virtual terminal), and then connect
the debugger to the program. The key to this is passing the -D <socket>
parameter to ocamlrun, as mentioned in section 16.8.6 of the manual.
Except that ocamlrun does not recognise the -D parameter. :(
Thanks in advance,
Jim
--
Jim Farrand
--
NB: I have a spam-filter on my e-mail account. The first time you e-mail
me you may be asked to confirm your e-mail address before the system delivers
your mail. http://farrand.net/home-spamfilter.shtml
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] OCamlRun -D?
2003-09-09 8:24 [Caml-list] OCamlRun -D? Jim Farrand
@ 2003-09-09 15:58 ` Xavier Leroy
0 siblings, 0 replies; 2+ messages in thread
From: Xavier Leroy @ 2003-09-09 15:58 UTC (permalink / raw)
To: Jim Farrand; +Cc: caml-list
> How can I use the ocaml debugger to debug a program that uses ncurses?
> I can't run the program from inside the debugger as the mixture of
> ncurses output from my program, and the non-ncurses output from the
> debugger produces garbage.
>
> The manual seems to hint that I can run the program, and then run the
> debugger externally (on a different virtual terminal), and then connect
> the debugger to the program. The key to this is passing the -D <socket>
> parameter to ocamlrun, as mentioned in section 16.8.6 of the manual.
> Except that ocamlrun does not recognise the -D parameter. :(
Yes, the manual is outdated and will be fixed. You can achieve the
desired effect by setting the CAML_DEBUG_SOCKET environment variable
before running the program:
In terminal 1:
ocamldebug myprog
set loadingmode manual
run
(it prints a socket path, e.g. /tmp/camldebug9960)
In terminal 2:
CAML_DEBUG_SOCKET=/tmp/camldebug9960 myprog
Hope this helps,
- Xavier Leroy
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-09-09 15:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-09 8:24 [Caml-list] OCamlRun -D? Jim Farrand
2003-09-09 15:58 ` Xavier Leroy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox