★ wanayoo — archive 1999 https://github.com/microsoft/vscode-java-debug/issues/797Nouvelle recherche | Portail wanayoo
Skip to content
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

Automatically add -XX:+ShowCodeDetailsInExceptionMessages when launching #797

Closed
fbricon opened this issue Apr 28, 2020 · 0 comments
Closed

Automatically add -XX:+ShowCodeDetailsInExceptionMessages when launching #797

fbricon opened this issue Apr 28, 2020 · 0 comments
Assignees
Labels
Milestone

Comments

@fbricon
Copy link
Collaborator

@fbricon fbricon commented Apr 28, 2020

When a program is launched with Java 14, it might be useful to automatically add -XX:+ShowCodeDetailsInExceptionMessages to the vmArgs, so that NPEs provide better troubleshooting informations. See https://www.baeldung.com/java-14-nullpointerexception for more details.

The flag should be added dynamically during launch, if not already present in the launch.json's "vmArgs" option. Better not generate the launch.json with the flag directly in it, as things will go wrong if the project's JDK version changes:

Unrecognized VM option 'ShowCodeDetailsInExceptionMessages'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

This enhanced behavior could be disabled with a new setting.

@fbricon fbricon changed the title Automatically add -XX:+ShowCodeDetailsInExceptionMessages to launch configurations Automatically add -XX:+ShowCodeDetailsInExceptionMessages when launching Apr 28, 2020
@testforstephen testforstephen added this to the 0.27.0 milestone May 13, 2020
@testforstephen testforstephen self-assigned this May 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants
You can’t perform that action at this time.