eclipse-platform / eclipse-platform/eclipse.platform

Unable to start program if org.eclipse.debug.terminal is in the target platform

Open
#2,428 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
165
Forks
174
Avg merge
2d 8h
Merged PRs (30d)
22

Description

Latest master, on Windows 11.

1) Import `org.eclipse.debug.terminal` into the workspace
2) Start Eclipse from Eclipse
3) Try to debug any trivial Java program like
```
import javax.swing.JOptionPane;
public class SomeClass {
public static void main(String[] args) throws Exception {
JOptionPane.showMessageDialog(null, "Hello, World!");
while (true) {
System.err.println(".");
Thread.sleep(5000);
}
}
}
```
Error will be reported, nothing will be started.
Sometimes Console is opened & some process is shown in debugger but Console doesn't show any output, and debugger doesn't connect.
```
eclipse.buildId=4.39.0.I20260116-1800
java.version=25.0.1
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
Framework arguments: -product org.eclipse.sdk.ide
Command-line arguments: -product org.eclipse.sdk.ide -data C:\eclipse\workspaces\platform/../runtime-Java25 -dev file:///C:/eclipse/workspaces/platform/.metadata/.plugins/org.eclipse.pde.core/Java25/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog

org.eclipse.jdt.launching
Error
Sun Jan 18 17:41:17 CET 2026
Cannot connect to VM

java.net.SocketException: Socket closed
at java.base/sun.nio.ch.NioSocketImpl.endAccept(NioSocketImpl.java:685)
at java.base/sun.nio.ch.NioSocketImpl.accept(NioSocketImpl.java:758)
at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:593)
at java.base/java.net.ServerSocket.platformImplAccept(ServerSocket.java:560)
at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:536)
at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:482)
at java.base/java.net.ServerSocket.accept(ServerSocket.java:441)
at org.eclipse.jdi.internal.connect.SocketTransportService.accept(SocketTransportService.java:91)
at org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTransportImpl.java:63)
at org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(SocketListeningConnectorImpl.java:167)
at org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable.run(StandardVMDebugger.java:113)
at java.base/java.lang.Thread.run(Thread.java:1474)
```

Image

4) Close `org.eclipse.debug.terminal` project, restart Eclipse and run same config - everything works.
5) Similar happens with the batch file executed as "external program"
```
@echo off
echo Hello World
pause
```

The change is related to 67a55ce2b78b152414967bfe3b5007cca5b064c7 / https://github.com/eclipse-platform/eclipse.platform/pull/1763.

What I miss is any **reasonable** possibility to **disable** this behavior from the launch configuration.

There is a new options group "Allocate console | Allocate terminal | Disable Input/Output" added in the launch config that probably is supposed to control this behavior, but it simply doesn't make any difference which option I select, nothing changes.

Image

Only way I found to "fix" the problem is to disable output merging which results in this code below executed that prevents `PTY` to be created:

https://github.com/eclipse-platform/eclipse.platform/blob/master/debug/org.eclipse.debug.terminal/src/org/eclipse/debug/terminal/PtyExecFactory.java#L33-L35

But this is surely not "right" way to deal with that problem.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.