microsoft / microsoft/java-debug
Feature Request: Allow specifying the address when binding to a port
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 409
- 派生
- 204
- 平均合并
- 1 天 13 小时
- 30 天内合并 PR
- 4
描述
When opening a Java debugging session in my local machine, I'd prefer to be able to have the TCP port that the debug server will bind to in the loopback interface instead of in all of them, mostly out of paranoia when I'm working on a shared WiFi.
Also (and maybe less interesting to other folks), at replit.com, we detect TCP ports bound to 0.0.0.0 and treat them magically as web servers, so this should also prevent opening a debug session causing an unintended web server from being "deployed".
So I would like for it to be specify what interface and/or port the JavaDebugServer should bind to. Since the JavaDebugServer is a singleton, it might make sense to configure this through a system property (since sending this configuration in the initialize message may not have the intended effect if the LSP process had already spawned one JavaDebugServer instance). So something like
$ java \
-Declipse.application=org.eclipse.jdt.ls.core.id1 \
-Dosgi.bundles.defaultStartLevel=4 \
-Declipse.product=org.eclipse.jdt.ls.core.product \
-Dcom.microsoft.java.debug.serverAddress=localhost:12345 \ # <- a brand new property
-noverify \
-Xmx256m \
-jar ../jdt/plugins/org.eclipse.equinox.launcher_1.6.100.v20201223-0822.jar \
-configuration ../jdt/config_linux \
-data /home/runner/JavaDAP \
--add-modules=ALL-SYSTEM \
--add-opens', 'java.base/java.util=ALL-UNNAMED \
--add-opens', 'java.base/java.lang=ALL-UNNAMED
should do the trick.
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先定位 JavaDebugServer 以及绑定其 TCP 调试服务器的代码,然后检查启动时系统属性的处理方式。完成的标准是:调试服务器可以使用请求的接口和端口进行配置,包括 loopback,同时不破坏其现有的启动行为。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- devtools, networking
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 28/100