vscode: Debug failed to load: Process picker failed (your 131072x1 screen size is bogus, expect trouble)

Debugger failed to load when using with “attach by process ID”.

I’m running VS Code connected to WSL 2 with Ubuntu 18.04.2 LTS.

I had the same code running in pure Windows environment, and debugger launched fine. I start getting this screen size is bogus error when I moved my code to WSL 2, unsure if it’s WSL related or VS Code.

Version: 1.35.1 (system setup) Commit: c7d83e57cd18f18026a8162d042843bda1bcf21f Date: 2019-06-12T14:30:02.622Z Electron: 3.1.8 Chrome: 66.0.3359.181 Node.js: 10.2.0 V8: 6.6.346.32 OS: Windows_NT x64 10.0.18917 *** I use the official Microsoft “Remote - WSL” extension from marketplace to connect to WSL

Steps to Reproduce:

  1. Launch VS Code in Windows
  2. Open code in WSL 2
  3. Configure launch.json with the following { "type": "node", "request": "attach", "name": "Attach by Process ID", "processId": "${command:PickProcess}" }
  4. Start debugging by click the green play button.

image

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 16
  • Comments: 17 (11 by maintainers)

Commits related to this issue

Most upvoted comments

This fix is implemented and merged. It will appear in the next Insiders (tomorrow).

This issue is basically a variant of #35798:

On some linux systems, the “/bin/ps” command tries to verify that the screen size is big enough to print something useful. If the size is too small, the message “your 131072x1 screen size is bogus, expect trouble” gets send to stderr.

Since the VS Code “process picker” is using “/bin/ps” to find all node.js processes it suffer from this useless error message: if an error is detected on stderr, the picker shows the error and assumes that the “ps” has failed.

The workaround is to detect and ignore this special “error” produced by “ps”.

Same issue here when attempting to attach to .NET Core running in WSL 2.

Screenshot 2019-08-02 13 19 03

If I manually fetch the pid from my container and hardcode launch.json, it seems the debugger attached just fine. It’s only the process picker causing the issue.

The fix allowed me to completely move to WSL 2. Great work team. (I moved to VS Code insiders for the fix and haven’t used stable since.)

@weinand Can we please keep the issue open until the fix is implemented and merged?

I will not be able to use VSCode until this gets fixed, as this is a blocker for me

I’m also seeing this trying to switch what solution Omnisharp is analyzing in the C# extension when using WSLv2.

As a workaround, I attach via remote debugger:

In launch.json

{
      "type": "node",
      "request": "attach",
      "name": "Attach",
      "restart": true,
      "localRoot": "${workspaceRoot}",
      "remoteRoot": "${workspaceRoot}"
    }

And start node with --inspect.

This works even better with nodemon: nodemon --watch src -e ts --exec node --inspect .

7 months later and the issue still exists. The workaround for me was to downgrade from WSL 2 to WSL 1. You lose the features of WSL 2 but it at least allows to continue working.

Hoping to see some update on the issue.