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

Microsoft.VisualStudio.Shared.VSCodeDebugProtocol should not parse ISO 8601 compliant strings as date object #34

Open
stertingen opened this issue Feb 23, 2025 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@stertingen
Copy link

The nuget package's Microsoft.VisualStudio.Shared.VSCodeDebugProtocol project URL lists this repo as its homepage, so that's why I'm reporting the issue here.

The MIEngine, used by the vscode-cpptools extension, changes the to-be-debugged application's CLI args if they contain ISO 8601 strings. I have boiled down this issue of MIEngine using the default behavior of the Newtonsoft.Json library. For whatever reason, it sometimes parses strings as date objects, which may serialize to a different string than originally used.

MIEngine seems to use Microsoft.VisualStudio.Shared.VSCodeDebugProtocol for parsing the JSON document, leaving no room for adjusting the JSON parser's behavior by itself.

I investigated the Microsoft.VisualStudio.Shared.VSCodeDebugProtocol package and came to the conclusion that Microsoft.VisualStudio.Shared.VSCodeDebugProtocol.Protocol.DebugProtocol might needed to be modified to include the DateParseHandling = DateParseHandling.None setting in its jsonSettings.

However, I'm not sure if this is sufficient to fix the issue everywhere because I cannot find the source code to that package to verify it.

Related issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants