With the old jdb/sun.tools.debug remote debugging the standard output
and error streams in the VM/agent were redirected to the socket
connection to the debugger. This was a very useful feature (perhaps
side effect) as it allowed a tty debugger to print the output and
error streams to the console in the debugger.
JDWP uses a structured message exchange between the debugger and
debuggeer and the protocol doesn't appear to allow a streams to
be encapsulated and thus it doesn't appear to be possible to
redirect output and error streams to the debugger.
This RFE is to support redirecting of output and error streams
to the debugger. This is only applicable to the socket transport
at this time. It may be necessary to use an additional socket
connection rather than stretching the JDWP protocol.
In implementation terms the socket transport could support a
redirectoutput={y,n} option and if so it connects to a socket
that the debugger has binded too. On the debugger side a thread
could bind to a port and wait for messages to arrive. With a
tty debugger these messages could be printed to the console.
In a graphical debugger these could be displayed in an output
window.
- duplicates
-
JDK-4446286 Println message is not reflected to remote debugging machine
- Closed
-
JDK-4641616 JDWP: Need a way to send output and error streams to debugger
- Closed
- relates to
-
JDK-4368399 JDI: -verbose option passed to debugger launcher fails and hangs vm
- Closed
-
JDK-4492918 TTY: debugee output not seen until a newline is written
- Closed
-
JDK-4533879 Enhance remote debugging
- Closed