Skip to content

Generate the launch configuration in memory if no launch.json exists - #733

Merged
Jinbo Wang (testforstephen) merged 3 commits into
masterfrom
jinbo_runJava
Dec 20, 2019
Merged

Jinbo Wang (testforstephen) merged 3 commits into
masterfrom
jinbo_runJava

Conversation

@testforstephen

Copy link
Copy Markdown
Contributor

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.

Comment thread src/debugCodeLensProvider.ts Outdated
}

async function launchJsonExists(): Promise<boolean> {
const results: vscode.Uri[] = await vscode.workspace.findFiles(".vscode/launch.json", null, 1);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this work in multi-root? How about **/.vscode/launch.json?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@testforstephen
Jinbo Wang (testforstephen) deleted the jinbo_runJava branch December 20, 2019 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unhappy "Run Java" experience

2 participants