eclipse-theia / theia

Eclipse Theia is a cloud & desktop IDE framework implemented in TypeScript.
http://theia-ide.org
Eclipse Public License 2.0
20.05k stars 2.5k forks source link

[debug] RangeError: Maximum call stack size exceeded from node-debug2 adapter #7941

Open kittaakos opened 4 years ago

kittaakos commented 4 years ago

Bug Description:

I have noticed this error when I refreshed the frontend while an active debug session was running.

root ERROR [hosted-plugin: 4773] /workspace/theia/plugins/vscode-builtin-node-debug2/extension/node_modules/vscode-chrome-debug-core/node_modules/vscode-debugadapter/lib/messages.js:8
    constructor(type) {
               ^

RangeError: Maximum call stack size exceeded
    at new Message (/workspace/theia/plugins/vscode-builtin-node-debug2/extension/node_modules/vscode-chrome-debug-core/node_modules/vscode-debugadapter/lib/messages.js:8:16)
    at new Event (/workspace/theia/plugins/vscode-builtin-node-debug2/extension/node_modules/vscode-chrome-debug-core/node_modules/vscode-debugadapter/lib/messages.js:31:9)
    at new OutputEvent (/workspace/theia/plugins/vscode-builtin-node-debug2/extension/node_modules/vscode-chrome-debug-core/node_modules/vscode-debugadapter/lib/debugSession.js:147:9)
    at new LogOutputEvent (/workspace/theia/plugins/vscode-builtin-node-debug2/extension/node_modules/vscode-chrome-debug-core/node_modules/vscode-debugadapter/lib/logger.js:234:9)
    at InternalLogger.sendLog (/workspace/theia/plugins/vscode-builtin-node-debug2/extension/node_modules/vscode-chrome-debug-core/node_modules/vscode-debugadapter/lib/logger.js:212:27)
    at InternalLogger.log (/workspace/theia/plugins/vscode-builtin-node-debug2/extension/node_modules/vscode-chrome-debug-core/node_modules/vscode-debugadapter/lib/logger.js:181:18)
    at Logger._write (/workspace/theia/plugins/vscode-builtin-node-debug2/extension/node_modules/vscode-chrome-debug-core/node_modules/vscode-debugadapter/lib/logger.js:63:33)
    at Logger.log (/workspace/theia/plugins/vscode-builtin-node-debug2/extension/node_modules/vscode-chrome-debug-core/node_modules/vscode-debugadapter/lib/logger.js:32:14)
    at Logger.error (/workspace/theia/plugins/vscode-builtin-node-debug2/extension/node_modules/vscode-chrome-debug-core/node_modules/vscode-debugadapter/lib/logger.js:41:14)
    at Object.LoggingDebugSession.on (/workspace/theia/plugins/vscode-builtin-node-debug2/extension/node_modules/vscode-chrome-debug-core/node_modules/vscode-debugadapter/lib/loggingDebugSession.js:15:20)

Steps to Reproduce:

  1. Start a debug session, hit a breakpoint
  2. Refresh the frontend,
  3. Check logs on the backend.

Additional Information

akosyakov commented 4 years ago

It seems to come from the vscode extension, not our code?

marcdumais-work commented 4 years ago

Assuming this bug was noted using the example application, the version of node-debug2 we're using is starting to be quite old: 1.33.0

https://github.com/eclipse-theia/theia/blob/master/package.json#L118

We should probably try with e.g. 1.42.1: https://open-vsx.org/api/ms-vscode/node-debug2/1.42.1/file/ms-vscode.node-debug2-1.42.1.vsix