question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't run/debug within vscode

See original GitHub issue

Frustratingly, I can’t get my code to run from within vscode, so I’m not able to debug within vscode which is slowing down my development…

The issue arises when I try to initiate vedo.plotter.Plotter() when running from vscode, when I get this error:

ERROR: In /work/standalone-x64-build/VTK-source/Rendering/OpenGL2/vtkXOpenGLRenderWindow.cxx, line 1223
vtkXOpenGLRenderWindow (0x5587f7b42cf0): bad X server connection. DISPLAY=Aborted (core dumped)

If I run the same code directly in terminal, it runs fine, so this is an issue with the way vscode is configured, but I can’t find any answers online.

This seems to be an issue on all vscode installations I have running on Ubunut (in this case 20.04). Here’s the vscode info:

Version: 1.51.0
Commit: fcac248b077b55bae4ba5bab613fd6e9156c2f0c
Date: 2020-11-05T18:16:10.374Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Linux x64 5.4.0-52-generic snap

Similarly, I’m unable to open up browser windows from vscode (for example plotly fig.show() and selenium driver = webdriver.Chrome(chromedriver) won’t open browser windows. I get the following error with selenium:

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
  (unknown error: DevToolsActivePort file doesn't exist)

Similarly, this works fine direct from the terminal.

I’d really appreciate any help!

Jonny

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jonnymaseraticommented, Nov 17, 2020

Seems the issue is with the default console setting on vscode and changing it in launch.json fixed the problem, in my case to externalTerminal with the Terminal > External: Linux Exec setting set to the default x-terminal-emulator.

Here’s my launch.json settings:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "externalTerminal"
        }
    ]
}

Hope this helps anyone else who may be dealing with similar issues.

0reactions
jonnymaseraticommented, Nov 11, 2020

Thanks @marcomusy. I tried installing that package but it doesn’t change running in vscode unfortunately.

You’re correct, this is not an issue with vedo.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging in Visual Studio Code
To run or debug a simple app in VS Code, select Run and Debug on the Debug start view or press F5 and...
Read more >
Introduction to Debugging in Visual Studio Code
In this tutorial, we will show you how to run and debug a program in VS Code. We'll take a tour of the...
Read more >
Can't debug in VS Code - Stack Overflow
First, the UI looks different. It shows "RUN". enter image description here. Compared to what the UI looks like in the video, which...
Read more >
VS Code Debugger not working for python - Microsoft Q&A
I am experiencing debugging issue for my VS Code in WIN-10. ... It seems when I do Run->"start Debugging' no command comes to...
Read more >
vscode-java-debug/Troubleshooting.md at main - GitHub
Open your Maven pom.xml file or Gradle build.gradle file, then run VS Code command "Java: Update project configuration" to force the language server...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found