Generate the launch configuration in memory if no launch.json exists - #733
Merged
Merged
Conversation
Signed-off-by: Jinbo Wang <[email protected]>
Jinbo Wang (testforstephen)
requested review from
Yan Zhang (Eskibear),
Rome Li (akaroml) and
Sheng Chen (jdneo)
December 20, 2019 06:13
| } | ||
|
|
||
| async function launchJsonExists(): Promise<boolean> { | ||
| const results: vscode.Uri[] = await vscode.workspace.findFiles(".vscode/launch.json", null, 1); |
Member
There was a problem hiding this comment.
Will this work in multi-root? How about **/.vscode/launch.json?
Contributor
Author
There was a problem hiding this comment.
VS Code will search from each workspace root. This path is the path with the workspace root.
**/.vscode/launch.json will match myProject/.settings/.vscode/launch.json file, actually vscode will not take it as a launch.json.
Sheng Chen (jdneo)
approved these changes
Dec 20, 2019
Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Jinbo Wang [email protected]
Fix #724
No launch.json in the current workspace.
Triggering run or debug from the entries, such as F5, Code Lens and Context Menu, will generate a java configuration in memory and run the program directly.
launch.json already exists in the current workspace.
Trigger from Code Lens or Context Menu will also persist the configuration into the launch.json.