microsoft / microsoft/vscode-java-debug

Allow 3rd-party extensions to contribute in-memory launch config

Open
#1,387 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently, vscode-java-debug searches the .vscode/launch.json file for a launch config matching the classname+project name.

https://github.com/microsoft/vscode-java-debug/blob/415ae57296c10e9ffd2204ab66e22cb9d929259c/src/extension.ts#L450-L459

If none is found, a default config is built in memory:

https://github.com/microsoft/vscode-java-debug/blob/415ae57296c10e9ffd2204ab66e22cb9d929259c/src/extension.ts#L427-L433

I'd like the JBang extension to provide a custom in-memory config, where we can dynamically set the add-opens args for instance, to be able to keep in synch' with the JBang directives in the java file, rather than having to create/update .vscode/launch.json at some point.

Would be nice if vscode-java-debug allowed 3rd-party extension to contribue launch config participants, that, if they match, would then provide a custom in-memory config, if none was found on disk.

See the video at the 4'37" mark and https://twitter.com/fbricon/status/1698735665259626996 for context

cc @maxandersen

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 the launch-config lookup and fallback construction in src/extension.ts at lines 427-433 and 450-459. Trace how the default in-memory configuration is selected, then determine how a third-party participant such as JBang could contribute a matching configuration. Done means an extension can provide a custom in-memory config when no on-disk match exists, including dynamically derived add-opens arguments.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, typescript, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.