Support stopOnEntry and launchInTerminal in launch.json (#177)
* Define launchInTerminal config in launch.json Signed-off-by: Jinbo Wang <jinbwan@microsoft.com> * Support stopOnEntry and launchInTerminal in launch.json Signed-off-by: Jinbo Wang <jinbwan@microsoft.com> * Fix review comments * fix review comments
This commit is contained in:
parent
917b62d7f7
commit
d77e395d75
|
@ -56,6 +56,11 @@ Please also check the documentation of [Language Support for Java by Red Hat](ht
|
|||
- `projectName` - The preferred project in which the debugger searches for classes. There could be duplicated class names in different projects. This setting also works when the debugger looks for the specified main class when launching a program.
|
||||
- `cwd` - The working directory of the program.
|
||||
- `env` - The extra environment variables for the program.
|
||||
- `stopOnEntry` - Automatically pause the program after launching.
|
||||
- `console` - The specified console to launch the program. Defaults to `internalConsole`.
|
||||
- `internalConsole` - VS Code debug console (input stream not supported).
|
||||
- `integratedTerminal` - VS Code integrated terminal.
|
||||
- `externalTerminal` - External terminal that can be configured in user settings.
|
||||
|
||||
### Attach
|
||||
|
||||
|
|
22
package.json
22
package.json
|
@ -111,6 +111,26 @@
|
|||
"type": "object",
|
||||
"description": "The extra environment variables for the program.",
|
||||
"default": {}
|
||||
},
|
||||
"stopOnEntry": {
|
||||
"type": "boolean",
|
||||
"description": "Automatically pause the program after launching.",
|
||||
"default": true
|
||||
},
|
||||
"console": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"internalConsole",
|
||||
"integratedTerminal",
|
||||
"externalTerminal"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"VS Code debug console (input stream not supported).",
|
||||
"VS Code integrated terminal.",
|
||||
"External terminal that can be configured in user settings."
|
||||
],
|
||||
"description": "The specified console to launch the program.",
|
||||
"default": "internalConsole"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -159,6 +179,8 @@
|
|||
"name": "Debug (Launch)",
|
||||
"request": "launch",
|
||||
"cwd": "^\"\\${workspaceFolder}\"",
|
||||
"console": "internalConsole",
|
||||
"stopOnEntry": false,
|
||||
"mainClass": "",
|
||||
"args": ""
|
||||
}
|
||||
|
|
|
@ -44,6 +44,8 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
|
|||
request: "launch",
|
||||
// tslint:disable-next-line
|
||||
cwd: "${workspaceFolder}",
|
||||
console: "internalConsole",
|
||||
stopOnEntry: false,
|
||||
mainClass: item.mainClass,
|
||||
projectName: item.projectName,
|
||||
args: "",
|
||||
|
@ -108,9 +110,6 @@ export class JavaDebugConfigurationProvider implements vscode.DebugConfiguration
|
|||
config.request = "launch";
|
||||
}
|
||||
|
||||
// Workaround bug https://github.com/Microsoft/vscode-java-debug/issues/145
|
||||
config.stopOnEntry = false;
|
||||
|
||||
if (config.request === "launch") {
|
||||
if (!config.mainClass) {
|
||||
const res = <any[]>(await resolveMainClass(folder ? folder.uri : undefined));
|
||||
|
|
Loading…
Reference in New Issue