microsoft / microsoft/vscode-java-debug

Refactor: Extract common code from LaunchRequestHandler's delegate

Open
#373 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

See ILaunchDelegate.java#L25-L27

    CompletableFuture<Response> launchInTerminal(LaunchArguments launchArguments, Response response, IDebugAdapterContext context);

    CompletableFuture<Response> launchInternally(LaunchArguments launchArguments, Response response, IDebugAdapterContext context);

There is common logic in implementation for both interfaces. The main differences in implementation for debug/noDebug are:

  • launchInTerminal: It constructs different command string, and then take different actions according to response.
  • launchInternally: It starts debuggee process in different ways.

Refactor work should be done to make code clean and readable.

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 with ILaunchDelegate.java at lines 25-27, then inspect the implementations of launchInTerminal and launchInternally in LaunchRequestHandler's delegate. Compare the shared logic and the debug/noDebug differences described in the issue; done means the common behavior is consolidated and the delegate remains readable without changing those distinct launch behaviors.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.