You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the VM fails to launch, the error reported to the user is a timeout after 10,000ms rather than an exit status or anything from the stdout or stderr. This makes it very hard to debug launch failures when using the integrated console. If using a terminal, the errors are visible in the terminal.
AdvancedLaunchingConnector doesn't notice that the VM process has terminated and instead has to wait to catch the TransportTimeoutException and then it reports a timeout.
I would love to improve this!
After the timeout we could check if the process has terminated (process.isAlive()) and report that exit status instead of a timeout, and read from the stdout and stderr to construct a better error message and log the stdout / stderr to the console so the user can see what happened. The VMStartException doesn't seem very well suited to our purpose as although it includes the Process, because we .destroy() it we don't have access to the streams. Perhaps we can make our own exception here that can glean more information from the Process.
Ideally instead of waiting for timeout we could observe the process termination early, so the user isn't left hanging for 10s. But it doesn't seem like that's easily supported in the underlying Eclipse code.
I'm going to tinker with this, but I'd love to know if this sounds like the right track for improvement.
The text was updated successfully, but these errors were encountered:
Note that it's important that the mainClass actually exists, and then we add a bad vmArgs which causes the java executable to exit immediately. The current implementation of java-debug doesn't detect the exit of the JVM and therefore waits for the 10s timeout.
This is an easy / minimal way to reproduce the error. I originally encountered the error when the JVM exited immediately due to other problems, specifically around modules not being found.
If the VM fails to launch, the error reported to the user is a timeout after 10,000ms rather than an exit status or anything from the stdout or stderr. This makes it very hard to debug launch failures when using the integrated console. If using a terminal, the errors are visible in the terminal.
AdvancedLaunchingConnector
doesn't notice that the VM process has terminated and instead has to wait to catch theTransportTimeoutException
and then it reports a timeout.I would love to improve this!
After the timeout we could check if the process has terminated (
process.isAlive()
) and report that exit status instead of a timeout, and read from the stdout and stderr to construct a better error message and log the stdout / stderr to the console so the user can see what happened. TheVMStartException
doesn't seem very well suited to our purpose as although it includes theProcess
, because we.destroy()
it we don't have access to the streams. Perhaps we can make our own exception here that can glean more information from theProcess
.Ideally instead of waiting for timeout we could observe the process termination early, so the user isn't left hanging for 10s. But it doesn't seem like that's easily supported in the underlying Eclipse code.
I'm going to tinker with this, but I'd love to know if this sounds like the right track for improvement.
The text was updated successfully, but these errors were encountered: