-
Notifications
You must be signed in to change notification settings - Fork 410
Provide jarmanifest/argfile approachs to shorten the command line #532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Eskibear
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| - `integratedTerminal` - VS Code integrated terminal. | ||
| - `externalTerminal` - External terminal that can be configured in user settings. | ||
| - `shortenCommandLine` - The specified command line style to launch the program. Defaults to `none`. | ||
| - `none` - Launch the program with the standard command line 'java [options] classname [args]'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add 'auto' as the default value to unblock majority of use cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new PR microsoft/java-debug#254 on java-debug to help compute the launch command length.
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
README.md
Outdated
| - `internalConsole` - VS Code debug console (input stream not supported). | ||
| - `integratedTerminal` - VS Code integrated terminal. | ||
| - `externalTerminal` - External terminal that can be configured in user settings. | ||
| - `shortenCommandLine` - The specified command line style to launch the program. Defaults to `auto`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should provide background for this option. In most case, user should not care about this issue. Or add a trouble shooting section for this problem.
package.json
Outdated
| "shortenCommandLine": { | ||
| "type": "string", | ||
| "enum": [ | ||
| "auto", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sequence: none should be put above auto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any explanation why need to sort the sequence like this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
none is consistent with the original semantic
package.nls.json
Outdated
| "java.debugger.launch.integratedTerminal.description": "VS Code integrated terminal.", | ||
| "java.debugger.launch.externalTerminal.description": "External terminal that can be configured in user settings.", | ||
| "java.debugger.launch.console.description": "The specified console to launch the program.", | ||
| "java.debugger.launch.shortenCommandLine.auto": "Auto detect the command line length and determine whether to shorten the command line via the appropriate approach.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto ==> "Automatically"
Should use full word in the description section. Auto standalone means car...
the ==> an
src/configurationProvider.ts
Outdated
| config.vmArgs = this.concatArgs(config.vmArgs); | ||
| } | ||
|
|
||
| await populateShortenCommandLineField(config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this only apply to the launch scenario? If so, it should come together with the launch logic section.
| } | ||
| } | ||
|
|
||
| function checkJavaVersion(javaHome: string): Promise<number> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agree. but prefer to do it with a new PR when the change in vscode-java is ready.
src/launchCommand.ts
Outdated
| const javaHome = await getJavaHome(); | ||
| const javaVersion = await checkJavaVersion(javaHome); | ||
| const recommendedApproach = javaVersion <= 8 ? shortenApproach.jarmanifest : shortenApproach.argfile; | ||
| if (config.console === "internalConsole") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this command current for Windows, please add a logic such as os.platform == 'win32` to filter where this code applies
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
Signed-off-by: Jinbo Wang jinbwan@microsoft.com
Fix the bug #110.
Add a new config
shortenCommandLinein launch.json to handle long classpath cases. The possible values arenone/jarmanifest/argfile.Peer PR on java-debug side: microsoft/java-debug#253
Closes #110