Date: Sep 12, 2013 10:41 AM
Author: dpb
Subject: Re: Breakpoint on specific command line output possible?

On 9/12/2013 7:54 AM, Jesse Hopkins wrote:
> Hello all - I've been trying to track down this small but annoying
> issue. We've got a logging utility built up that builds XML documents
> during our test executions. We've written a handful of matlab helper
> functions that wrap Java XML code for doing things like adding text
> elements, etc.. We've been able to produce some nice documents, but
> randomly the string "null" appears at the command line output. I have
> not been able to trace what is causing this output. I imagine its
> something in Java, because matlab doesn't really have the concept of
> "null", and I've grepped our entire source and "null" never appears. The
> trouble is, it is not repeatable. It happens just enough to stay on my
> radar. Are there techniques to trap the command line output of Java code
> running in matlab? I am hoping there's some way I can cause a breakpoint
> whenever "null" is printed to the command line.


I "know nuthink" about Java but -- what about for debugging redirecting
output to string variable and setting watch on it? That feasible?

I can't think of any way to make the ML debugger work on the command
output string directly...

Can you at least isolate the issue to a given function or set of
functions by observing a case when it does occur and rerunning that
input stream in piecewise fashion? Or is it one of those really nasty
things that rerunning doesn't necessarily reproduce the symptom, either?

--