Fix only general error message is shown when launch.json is invalid #1285
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When launch.json has invalid encoding/bom launch.json can not be parsed, but it seems that assert does not catches it, so there is a general error message about can not parsing the json, instead of the message that there is some kind of problem with launch.json
To reproduce (tested on Linux):
This PR fixes this behaviour. Currently it also shows the whole launch.json, so the
<feff>
is very telling. If it is too much I can revert to the original message. Maybe extending it with a hint that BOM might be the source of the error.