8000 Support stopOnEntry and launchInTerminal in launch.json by testforstephen · Pull Request #177 · microsoft/vscode-java-debug · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
},
Expand Down Expand Up @@ -159,6 +179,8 @@
"name": "Debug (Launch)",
"request": "launch",
"cwd": "^\"\\${workspaceFolder}\"",
"console": "internalConsole",
"stopOnEntry": false,
"mainClass": "",
"args": ""
}
Expand Down
5 changes: 2 additions & 3 deletions src/configurationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: "",
Expand Down Expand Up @@ -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));
Expand Down
0