microsoft / microsoft/vscode-containers

Use new resolveDebugConfigurationWithSubstitutedVariables() API in debug provider

Open
#123 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

.NET engineering Node/JS Python
Dominant language
TypeScript
Stars
139
Forks
87
Avg merge
9h 15m
Merged PRs (30d)
9

Description

With the January 2020 (1.42) release, we have the option to use the new resolveDebugConfigurationWithSubstitutedVariables() API in our Docker DebugConfigurationProvider. This gets called with any variables within the configuration having been resolved, which should allow us to dispense with our own (and known incomplete) resolution logic.

In addition to that, however, with the upcoming August 2020 (1.49) release, this API will now get called after the preLaunchTask completes. (Current versions call the API before the task is invoked.) The implication of this change is that we should now have a hook that runs after the last chained task but before we have to return the transformed debugging configuration, and this means that we now have an opportunity to pass information between those chained tasks and the debugger (such as the name of the created container, maybe mapped ports, etc.), rather than have to statically declare or infer them.

This could simplify our debugging logic and something we should look into in the near future.

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 by locating the Docker DebugConfigurationProvider and its current variable-resolution logic. Review how resolveDebugConfigurationWithSubstitutedVariables() is invoked around preLaunchTask, then determine whether the custom resolution can be removed and whether information from chained tasks can reach the returned debugging configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, typescript, vscode
Domain
devtools
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.