Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭
#2,428 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
38/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
java
领域
devtools

调研方向

在 Windows 11 上通过导入 org.eclipse.debug.terminal,并从启动配置中启动 Java 和批处理文件示例来重现。先从 debug/org.eclipse.debug.terminal/src/org/eclipse/debug/terminal/PtyExecFactory.java 第 33-35 行附近开始,然后检查 Allocate console、Allocate terminal 和 Disable Input/Output 选项的处理方式。完成的标准是:所选的启动选项控制 PTY 的创建,并且程序能够在调试器和控制台输出正常工作的情况下启动。

由索引模型根据 Issue 内容生成。

描述

bug

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
  1. Close org.eclipse.debug.terminal project, restart Eclipse and run same config - everything works.
  2. 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.

主要语言
Java
星标
165
派生
174
平均合并
2 天 16 小时
30 天内合并 PR
45

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

eclipse-platform/eclipse.platform 的其他 Issue

查看 eclipse-platform/eclipse.platform 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。