microsoft / microsoft/vscode-java-debug

Process Picker broken when JVM binds to random port

Open
#1,121 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

ai-triaged bug ux
Dominant language
TypeScript
Stars
591
Forks
429
Avg merge
1d 9h
Merged PRs (30d)
19

Description

When port conflicts occur, a user may choose to let the JVM bind to a random port by omitting the [address attribute] (https://docs.oracle.com/cd/E19501-01/819-3664/abgdm/index.html) or by passing address=0 as command-line arguments. This breaks the process picker because it matches on address, which is either missing or its value is 0:

https://github.com/microsoft/vscode-java-debug/blob/32c57f85d6e4a00842b42a45ee763d87f3883fbb/src/processPicker.ts#L9

A workaround is to let users manually enter the port: https://github.com/tlaplus/CommunityModules/commit/fa56d3fd1bd29dbfc9449a2cf711259ade5abbfc

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at src/processPicker.ts line 9 and reproduce the picker with a JVM using an omitted address or address=0. Trace how the picker matches processes and make the random-port case selectable instead of failing; verify that users no longer need to enter the port manually.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.