Vscode: EPIPE write failure while debugging after upgrading to 1.49

Created on 11 Sep 2020  路  18Comments  路  Source: microsoft/vscode




  • VSCode Version: 1.49
  • OS Version: Pop OS 20.04 (Ubuntu)

Steps to Reproduce:

  1. Upgrade to 1.49
  2. Trying to debug


Does this issue occur when all extensions are disabled?: Yes

After upgrading to 1.49, both a Linux Pop OS machine and a Mac OSX machine on my team started having the following error: When attempting to launch the debugger, we would receive a failure to write EPIPE error. The error triggers in the tslib package. In our particular situation, it starts with an attempt to createConnection() with the TypeORM package (which uses node-mssql and tedious). Stepping into that breakpoint trigger the tslib failure and the EPIPE message.

Rolling back to VSCode 1.48 eliminated the problem.

bug candidate debug z-author-verified

Most helpful comment

I think I found the issue! Please try adding "outputCapture": "std", in your launch.json as a workaround (may need to change type to pwa-node for it to be seen as valid).

This fixes the issue for me; let me know if it does the same for you.

All 18 comments

What debugger are you using?

The built-in debugger with Visual Studio Code. This occurs at project start-up when clicking the debug icon.

Here is an entry from the launch.json:

{
        "type": "node",
        "request": "launch",
        "name": "Launch LMS Program",
        "program": "${workspaceFolder}/apps/lms/dist/index.js",
        "preLaunchTask": "build-lms",
        "outFiles": [
            "${workspaceFolder}/apps/lms/dist/**/*.js"
        ],
        "envFile": "${workspaceFolder}/apps/lms/.env"
}

And the problem reproduces after disabling all extensions?

@weinand Yes on both the Debian version and the Mac OSX version of Visual Studio Code 1.49. The only thing that fixed it was rolling back to 1.48 (which fixed it on both computers).

See the solution here https://github.com/microsoft/vscode/issues/106484#issuecomment-691202789


Previous comment

Does it make a difference if you:

  • comment out the "preLaunchTask"?
  • add "debug.javascript.usePreview": false as a user setting?

(only one at a time, not both)

@weinand I can give this a shot this weekend. Right now I need the downgraded version for work-related tasks, so I'll have to carve out some time to try it.

Does it make a difference if you:

  • comment out the "preLaunchTask"?
  • add "debug.javascript.usePreview": false as a user setting?

(only one at a time, not both)

Same problem,

I dont have preLaunchTask and the usePreview: false didn't work

Can you also try adding nodeVersionHint: 10 to your launch.json?

Can you also try adding nodeVersionHint: 10 to your launch.json?

nodeVersionHint is not recognized as a valid config key, you mean here?

image

Yep, there. (It'll be recognized if you change type to pwa-node).

Also, @nico93f what kind of program are you running? I saw this yesterday in Next.js which was caused by a bug that was fixed in recent versions... wondering if other tools are running into a similar problem.

Oh btw, it didn't work :stuck_out_tongue:

Looks like the EPIPE my Next.js is coming from Node's inspector internals, triggered originally from jest-worker. Continuing to investigate.

Can you collecct trace logs using these instructions?

If you're able to, add "trace": true to your launch.json and reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.

鈿狅笍 This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to [email protected]

Actually "debug.javascript.usePreview": false does resolve the problem on my side.

It should, since the old debugger doesn't know how to debug child processes (which is where the one repro case I have fails).

Are you able to collect a trace log @maximedupre?

@connor4312 Just sent the trace log to your email address

I think I found the issue! Please try adding "outputCapture": "std", in your launch.json as a workaround (may need to change type to pwa-node for it to be seen as valid).

This fixes the issue for me; let me know if it does the same for you.

Yep that fixes the issue! Didn't need to change to "type": "pwa-node".

Awesome, thank you for confirming. I will put in a fix for the recovery release.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

omidgolparvar picture omidgolparvar  路  3Comments

borekb picture borekb  路  3Comments

VitorLuizC picture VitorLuizC  路  3Comments

ryan-wong picture ryan-wong  路  3Comments

trstringer picture trstringer  路  3Comments