-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Uncaught SyntaxError: Unexpected end of input #2470
Comments
@isidorn Most likely this occurs if the debug-adapter is terminated while still sending data. The debug UI should catch exceptions thrown in the JSON parse and terminate the debug session. I expect that the debug session in many cases is already in the process of being shut down (and has actually terminated the debug adapter in the first place). |
@weinand I can do that, though terminating a session just because JSON parse fails might be a bit too harsh, no? This could produce weird behavior for other adapter which might be in development and are sending broken jsons. Shouldn't we just ignore the event if we think the debug adapter is going down anyways. |
@weinand just to remind you about this. |
@isidorn right, when the session is going down anyways, we can ignore the exception. In other cases, we should let the error ripple up and terminate the session with a corresponding error message. We should then self-host on this and get a feel for how often that happens. If it happens too often, we can disable that behaviour in the product. Just silently ignoring the exception in all cases is a bit dangerous... |
👍🏽 |
Issue Id: 3c0f493a-37c5-196b-ce04-755343aba4db
Versions
- 0.10.6-release
- dfc08dc
Stack
SyntaxError: Unexpected end of input
at Object.parse (native)
[/vs/workbench/parts/debug/node/v8Protocol.ts#L129:21 (V8Protocol.dispatch)](https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/workbench/parts/debug/node/v8Protocol.ts#L129:21 %28V8Protocol.dispatch%29)
[/vs/workbench/parts/debug/node/v8Protocol.ts#L108:11 (V8Protocol.handleData)](https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/workbench/parts/debug/node/v8Protocol.ts#L108:11 %28V8Protocol.handleData%29)
[/vs/workbench/parts/debug/node/v8Protocol.ts#L63:8 (V8Protocol.connect)](https://github.com/microsoft/vscode/blob/a80232bbcfe8a5cdad1ebc98638673d9dcb02458/src/vs/workbench/parts/debug/node/v8Protocol.ts#L63:8 %28V8Protocol.connect%29)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at readableAddChunk (_stream_readable.js:146:16)
at Socket.Readable.push (_stream_readable.js:110:10)
at Pipe.onread (net.js:523:20)
The text was updated successfully, but these errors were encountered: