Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to connect the debug console to my debugger ???
How to connect the debug console to my debugger ??? [message #326392] Tue, 18 March 2008 17:31 Go to next message
François is currently offline FrançoisFriend
Messages: 21
Registered: July 2009
Junior Member
Hello,

I have written a debugger for my language and the only trouble I have is
the message printing location.

The DebugPlugin seams to create a console for a new process but it does
not redirect the process' streams to this console...

In the launch delagate :
KBasicProcess basicProcess = new KBasicProcess( kermetaUnit, _requestPort,
_eventPort );
KProcess process = (KProcess) DebugPlugin.newProcess(launch, basicProcess,
"Debugger");
if (mode.equals(ILaunchManager.DEBUG_MODE)) {
IDebugTarget target = new KDebugTarget(launch, process, _requestPort,
_eventPort);
launch.addDebugTarget(target);
}

In the basic process :
@Override
public InputStream getErrorStream() {
return System.in;
}

@Override
public InputStream getInputStream() {
return System.in;
}

@Override
public OutputStream getOutputStream() {
return System.out;
}

I am certainly doing something wrong here, but I can't figure it out.
Need help please :)

François
Re: How to connect the debug console to my debugger ??? [message #326397 is a reply to message #326392] Tue, 18 March 2008 18:22 Go to previous message
John J. Barton is currently offline John J. BartonFriend
Messages: 311
Registered: July 2009
Senior Member
Maybe these lines will give you hints:
process.getStreamsProxy().getErrorStreamMonitor().addListene r(toConsole);
process.getStreamsProxy().getOutputStreamMonitor().addListen er(toConsole);

In toConsole.streamAppended() I write to my console.

John

François wrote:
> Hello,
>
> I have written a debugger for my language and the only trouble I have is
> the message printing location.
>
> The DebugPlugin seams to create a console for a new process but it does
> not redirect the process' streams to this console...
>
> In the launch delagate :
> KBasicProcess basicProcess = new KBasicProcess( kermetaUnit,
> _requestPort, _eventPort );
> KProcess process = (KProcess) DebugPlugin.newProcess(launch,
> basicProcess, "Debugger");
> if (mode.equals(ILaunchManager.DEBUG_MODE)) {
> IDebugTarget target = new KDebugTarget(launch, process,
> _requestPort, _eventPort);
> launch.addDebugTarget(target);
> }
>
> In the basic process :
> @Override
> public InputStream getErrorStream() {
> return System.in;
> }
>
> @Override
> public InputStream getInputStream() {
> return System.in;
> }
>
> @Override
> public OutputStream getOutputStream() {
> return System.out;
> }
>
> I am certainly doing something wrong here, but I can't figure it out.
> Need help please :)
>
> François
>
Previous Topic:workspace.findFilesForLocation ?
Next Topic:Image reuse: navigator link to editor image in plugin markup?
Goto Forum:
  


Current Time: Wed Jul 17 03:35:25 GMT 2024

Powered by FUDForum. Page generated in 0.03984 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top