Hi,
It looks like there is a race condition. Whilst debugging I noticed that I received the console output but when I run with no breakpoints there is no console output. So I put some tracing in to see what was happening and tracked the problem down to the fact that the streams for ProcessConsole are being close in the init function because the process has finished. So when the following lines are executed
IRemoteProcess remoteProcess = pb.start();
RemoteProcessAdapter process = new RemoteProcessAdapter(remoteProcess);
the process has ran the remote Valgrind application and read the results (which I also have put System.out.prinlns to see). Now when in runs
DebugPlugin.newProcess(launch, process, renderProcessLabel(localExePath.toOSString()));
this ends up creating a new ProcessConsole and in the init function the fProcess has terminated so it closes the streams but without reading the data from them:
protected void init() {
super.init();
if (fProcess.isTerminated()) {
closeStreams();
resetName();
} else {
DebugPlugin.getDefault().addDebugEventListener(this);
}
Anybody know what's the best solution to this? Should RemoteProcess not start straight away and somehow start when DebugPlugin.newProcess has been called or should ProcessConsole read the streams when terminated?
Many Thanks,
Martin.