microsoft / microsoft/java-debug
Feature Request: Allow specifying the address when binding to a port
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 409
- フォーク
- 204
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず JavaDebugServer と、その TCP デバッグサーバーをバインドするコードを見つけ、次に起動時のシステムプロパティがどのように処理されているかを確認します。デバッグサーバーを、loopback を含む要求されたインターフェースとポートで設定でき、既存の起動動作を壊さない状態になれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- devtools, networking
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 28/100