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

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

Closed
markmail opened this issue Jun 22, 2019 · 17 comments
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@markmail
Copy link

markmail commented Jun 22, 2019

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: c7d83e5
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

@fabienheureux
Copy link

Fyi, I encountered the exact same issue with the same configuration.
Did not find a way to fix it for now

@weinand weinand added the debug Debug viewlet, configurations, breakpoints, adapter issues label Jun 24, 2019
@CrshOverride
Copy link

CrshOverride commented Aug 2, 2019

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.

@weinand weinand added the bug Issue identified by VS Code Team member as probable bug label Oct 16, 2019
@victor141516
Copy link

I'm having the same issue. As @CrshOverride said, if you hardcode the pid in the config file it will work. However this workaround is much slower than the automatic pid finding. I'd like to see a fix for this soon since it looks like a simple issue

@shrestaz
Copy link

shrestaz commented Feb 5, 2020

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.

@Gorthog
Copy link

Gorthog commented Feb 15, 2020

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 .

@Pilchie
Copy link
Member

Pilchie commented Feb 27, 2020

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

@neilenns
Copy link
Contributor

neilenns commented Mar 6, 2020

I hit this as well, with the same config as the original report: WSL2, code launched from inside WSL2, then trying to use the process picker to look for running node.js instances.

Workaround also worked: I can make a launch task that attaches via the specific node debugger port and it works fine.

@weinand
Copy link
Contributor

weinand commented Mar 6, 2020

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".

@hanefi
Copy link
Member

hanefi commented Mar 9, 2020

@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

@weinand
Copy link
Contributor

weinand commented Mar 9, 2020

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

@connor4312
Copy link
Member

connor4312 commented Apr 2, 2020

@hanefi can you confirm whether the fix worked for you? 🙂

@connor4312 connor4312 added the author-verification-requested Issues potentially verifiable by issue author label Apr 2, 2020
@JacksonKearl
Copy link
Contributor

Bot isn't happy with commits in other repos... I'll work on this.
#93814 (comment)

In the mean time, @hanefi you can help us out by testing that things work as expected now, and if so comment /verified to mark this as resolved :)

@neilenns
Copy link
Contributor

neilenns commented Apr 2, 2020

Not the original reporter, but I just gave this a whirl with the insider's build and no longer get the error.

I launched code-insiders from inside an Ubuntu WSL2 instance then did Debug: Attach to Node Process. I was presented with a list of three node processes, all running on the Windows side. It did not show anything running in my Docker containers.

I then launched code (not insiders) from the same Ubuntu instance and tried Debug: Attach to Node Process. I got the error reported above.

So it appears fixed!

@weinand
Copy link
Contributor

weinand commented Apr 2, 2020

@danecreekphotography thanks for verifying.
Adding "verified" label

@weinand weinand added the verified Verification succeeded label Apr 2, 2020
@neilenns
Copy link
Contributor

neilenns commented Apr 2, 2020

Thanks! I didn't want to directly add the slash verified since I wasn't the original reporter.

@JacksonKearl
Copy link
Contributor

@danecreekphotography it only works for the issue author anyways :)

@shrestaz
Copy link

shrestaz commented Apr 6, 2020

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.)

@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2020
nukoyluoglu added a commit to nukoyluoglu/vscode-cpptools that referenced this issue Jun 20, 2020
…itiates similar fix for a different extension microsoft/vscode-node-debug/commit/5298920
sean-mcmanus pushed a commit to microsoft/vscode-cpptools that referenced this issue Jun 23, 2020
…0563 (and microsoft/vscode/issues/75932) (#5669)

* ignore 'screen size is bogus' error; fixes microsoft/vscode#75932; imitiates similar fix for a different extension microsoft/vscode-node-debug/commit/5298920
sean-mcmanus pushed a commit to microsoft/vscode-cpptools that referenced this issue Jun 26, 2020
…0563 (and microsoft/vscode/issues/75932) (#5669)

* ignore 'screen size is bogus' error; fixes microsoft/vscode#75932; imitiates similar fix for a different extension microsoft/vscode-node-debug/commit/5298920
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

13 participants