Fix launch configuration input variable resolution.#97440
Fix launch configuration input variable resolution.#97440weinand merged 5 commits intomicrosoft:masterfrom
Conversation
|
For the record, tasks already forward the source correctly, passing |
Tasks pass the first workspace folder in multi-root workspaces, but launch configurations do not. This makes their behaviors different, which is confusing to the user. The discrepancy is also a potential source of bugs, as developers may assume same behavior and only test one path (e.g. microsoft#95482, microsoft#96570, microsoft#97202, microsoft#97440).
When resolving launch configuration variables during a debug session, the configuration target was not being specified, always defaulting to reading workspace folder inputs. This made it impossible for user or workspace file launch configurations to use input variables, as the inputs list was never found. This change forwards the launch configuration source to the configurationResolverService, so that it looks for the inputs list in the right place. Forwarding the source fixed single-root workspaces, but multi-root workspaces were skipping the inputs lookup, since they pass an undefined workspace folder... In this case, the workspace folder is not relevant, as the config and inputs are defined in the workspace file, and allowing resolution to continue yields the desired behavior.
10f8f7b to
352f231
Compare
|
Any chance this could make it in the May milestone (assuming it looks good :) )? Would love to be able to use input variables in our launch configs... Thanks! |
|
What is the status of this PR, will it be merged anytime soon? For our team it's a major headache because the dynamic workspace file that we generate during configuration process is useless without being able to use input variables in launch configurations. I fear we will have to resort to programatically modifying folder's |
|
I'm on vacation right now, but will resolve the issue ASAP. |
|
@weinand Thank you, I appreciate it! |
|
@bzarco PR looks good and works fine. |
When resolving launch configuration variables during a debug session, the configuration target was not being specified, always defaulting to reading workspace folder inputs. This made it impossible for user or workspace file launch configurations to use input variables, as the inputs list was never found.
This change forwards the launch configuration source to the configurationResolverService, so that it looks for the inputs list in the right place.
Forwarding the source fixed single-root workspaces, but multi-root workspaces were skipping the inputs lookup, since they pass an undefined workspace folder... In this case, the workspace folder is not relevant, as the config and inputs are defined in the workspace file, and allowing resolution to continue yields the desired behavior.
This PR fixes #96522