octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging output


From: Daniel J Sebald
Subject: Re: Debugging output
Date: Sun, 31 Jan 2016 19:48:37 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 01/31/2016 06:57 PM, LachlanA wrote:
Daniel Sebald wrote
   From what I remember, the stderr/stdout/signal handling is a delicate
thing in the GUI/core setup.  There were several bug/patch reports along
the way, but I don't think an acceptable solution ever emerged.

... it might have side effects like cntrl-C not working correct
or whatnot.  My guess is you won't find a quick fix, although an
in-depth fix might be possible.  But there are multiple platforms to
consider, so...

Search around the Qt documentation for "qt debugging techniques", or
"qDebug", and such.  Maybe that will help.

Thanks, Dan.  That is good background to know.  I'll put it low down on the
to-do list :)

Regarding qDebug, that only works for printing in the Qt portion of the code
itself.  If GUI behaviour causes a crash in Octave core code, then
stderr/cerr is still useful, and Qt doesn't provide a stack trace, AFAICT.

I agree, as I use stderr quite a bit by just placing fprintf() in various places and watch what does or doesn't appear before the crash. A Qt equivalent might be to call a one-line modal dialog box and simply hit "OK" every time the text, then note where the crash occurs. Clumsy, but works.

If debugging something in the core of Octave, then octave-cli and fprintf(stderr,) still works.

Dan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]