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/Run with terminal integratedTerminal not working anymore #8375

Closed
amesser opened this issue Nov 5, 2019 · 6 comments
Closed

Debug/Run with terminal integratedTerminal not working anymore #8375

amesser opened this issue Nov 5, 2019 · 6 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@amesser
Copy link

amesser commented Nov 5, 2019

Today I just stumbled across python debugging/running when using "integratedTerminal" is not working anymore. As far as I remind, last week it worked without an an issue. I alos upgrade to most recent version today now but the problem still exists

Environment data

  • VS Code version: 1.39.2
  • Extension version (available under the Extensions sidebar): 2019.10.44104
  • OS and version: Linux x64 4.14.11-amd64
  • Python version (& distribution if applicable, e.g. Anaconda): Devuan/Debian 2.7
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): N/A
  • Relevant/affected Python packages and their versions: N/A
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version #3977): N/A

Expected behaviour

Python script is started and executes

Actual behaviour

I can see the "Python Debug Console" flash up show some printouts and immediately closes. The debug bar at top of screen vanishes after some seconds and error popup "error launching..." is displayed.

Steps to reproduce:

  1. Press [F5] or [CTRL]+ [F5]

Logs

N/A

Files

launch.json (not working)

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Python: Run testcase file",
      "type": "python",
      "request": "launch",
      "program": "${file}",
      "console": "integratedTerminal",
      "env" : {
        "PYTHONPATH" : "${workspaceFolder}"
      }
    }
  ]
}

launch.json (working)

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Python: Run testcase file",
      "type": "python",
      "request": "launch",
      "program": "${file}",
      "console": "internalConsole",
      "env" : {
        "PYTHONPATH" : "${workspaceFolder}"
      }
    }
  ]
}

settings.json

{
    "workbench.colorTheme": "Solarized Light",
    "telemetry.enableCrashReporter": false,
    "telemetry.enableTelemetry": false,
    "editor.renderWhitespace": "all",
    "files.trimTrailingWhitespace": true,
    "window.zoomLevel": 1,

    "terminal.integrated.shell.linux": "/usr/bin/env",
    "terminal.integrated.shellArgs.linux": [
        "LANG=de_DE@utf-8",
        "/bin/bash"
    ],
}
@amesser amesser added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Nov 5, 2019
@karthiknadig karthiknadig self-assigned this Nov 5, 2019
@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Nov 5, 2019
@karthiknadig
Copy link
Member

@amesser Do you see any error in the terminal? Or in the output panel for Python.

@karthiknadig karthiknadig added the info-needed Issue requires more information from poster label Nov 6, 2019
@amesser
Copy link
Author

amesser commented Nov 6, 2019

Unfortunately not. In error case, I see VS code console switches for a very short time to "Python Debug Console" but immediately closes it again. The console seems to be filled with some output which looks like environment variable assignments, but I'm not fully sure. There is neither an error output in a terminal from which I started VS code nor in the other console windows in VS code.

Can I set something in VS code which makes it to not close the console or to produce more debug output to stdout/stderr? It looks to me that VS code always forks to background when starting from a terminal?

@karthiknadig
Copy link
Member

@amesser Can you share the output of this panel? You may have to scroll all the way to the top to see this:
image

@amesser
Copy link
Author

amesser commented Nov 6, 2019

Will do later. (Have no access to the machine at the moment)

@amesser
Copy link
Author

amesser commented Nov 6, 2019

@karthiknadig Here we go

Output/Python

> conda --version
> pyenv root
> python3.7 -c "import sys;print(sys.executable)"
> python3.6 -c "import sys;print(sys.executable)"
> python3 -c "import sys;print(sys.executable)"
> python2 -c "import sys;print(sys.executable)"
> python -c "import sys;print(sys.executable)"
> /usr/bin/python -c "import sys;print(sys.executable)"
> conda info --json
> /usr/bin/python ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python2 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python2 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python2.7 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python2.7 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python3 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python3 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python3.5 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python3.5 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python2 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python2 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python2.7 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python2.7 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python3 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python3 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python3.5 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python3.5 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python3 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python3 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python2 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python2 ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
> /usr/bin/python ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles/interpreterInfo.py
Starting Jedi Python language engine.
> /usr/bin/python -m pylint --disable=all --enable=F,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,unused-wildcard-import,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode,E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0107,E0108,E0110,E0111,E0112,E0113,E0114,E0115,E0116,E0117,E0118,E0202,E0203,E0211,E0213,E0236,E0237,E0238,E0239,E0240,E0241,E0301,E0302,E0303,E0401,E0402,E0601,E0602,E0603,E0604,E0611,E0632,E0633,E0701,E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text "~/Arbeit/Shared/Profinet Tests/Shared/DataExchange.py"
cwd: ~/Arbeit/Shared/Profinet Tests
> /usr/bin/python -m pylint --disable=all --enable=F,unreachable,duplicate-key,unnecessary-semicolon,global-variable-not-assigned,unused-variable,unused-wildcard-import,binary-op-exception,bad-format-string,anomalous-backslash-in-string,bad-open-mode,E0001,E0011,E0012,E0100,E0101,E0102,E0103,E0104,E0105,E0107,E0108,E0110,E0111,E0112,E0113,E0114,E0115,E0116,E0117,E0118,E0202,E0203,E0211,E0213,E0236,E0237,E0238,E0239,E0240,E0241,E0301,E0302,E0303,E0401,E0402,E0601,E0602,E0603,E0604,E0611,E0632,E0633,E0701,E0702,E0703,E0704,E0710,E0711,E0712,E1003,E1101,E1102,E1111,E1120,E1121,E1123,E1124,E1125,E1126,E1127,E1128,E1129,E1130,E1131,E1132,E1133,E1134,E1135,E1136,E1137,E1138,E1139,E1200,E1201,E1205,E1206,E1300,E1301,E1302,E1303,E1304,E1305,E1306,E1310,E1700,E1701 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text "~/Arbeit/Shared/Profinet Tests/Shared/DataExchange.py"
cwd: ~/Arbeit/Shared/Profinet Tests
> conda info --json
> conda --version
> /usr/bin/python -c "import pylint"
> /usr/bin/python -c "import pylint"
> /usr/bin/python -c "import pylint"
> /usr/bin/python -c "import pylint"

Linter 'pylint' is not installed. Please install it or select another linter".
Error: Module 'pylint' not installed.
> /usr/bin/python -c "import sys;print(sys.prefix)"
cwd: ~/Arbeit/Shared/Profinet Tests
> /usr/bin/python -c "import sys;print(sys.prefix)"
cwd: ~/Arbeit/Shared/Profinet Tests
> /usr/bin/python -c "import sys;print(sys.executable)"
cwd: ~/Arbeit/Shared/Profinet Tests
> /usr/bin/python -c "import sys;print(sys.executable)"
cwd: ~/Arbeit/Shared/Profinet Tests
> /usr/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: ~/Arbeit/Shared/Profinet Tests
> /usr/bin/python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"
cwd: ~/Arbeit/Shared/Profinet Tests
> /usr/bin/python -m site --user-site
cwd: ~/Arbeit/Shared/Profinet Tests
> /usr/bin/python -m site --user-site
cwd: ~/Arbeit/Shared/Profinet Tests
> /usr/bin/python completion.py
cwd: ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles
> /usr/bin/python completion.py
cwd: ~/.vscode/extensions/ms-python.python-2019.10.44104/pythonFiles

and Output/Log(Window), seems to be more promising:

[2019-11-06 20:57:50.496] [renderer1] [error] Error: [File Watcher (chokidar)] Inotify limit reached (ENOSPC)
[2019-11-06 20:57:50.504] [renderer1] [error] [File Watcher (chokidar)] Inotify limit reached (ENOSPC)
[2019-11-06 20:58:04.889] [renderer1] [error] File not found (/USB/TCP): Error: File not found (/USB/TCP)
    at v.resolve (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:1535:605)
[2019-11-06 20:58:32.944] [renderer1] [error] ioctl(2) failed, EBADF: Error: ioctl(2) failed, EBADF
    at UnixTerminal.resize (/usr/share/code/resources/app/node_modules.asar/node-pty/lib/unixTerminal.js:227:13)
    at S.resize (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:2888:940)
    at w.setDimensions (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:4077:437)
    at _processManager.ptyProcessReady.then (file:///usr/share/code/resources/app/out/vs/workbench/workbench.desktop.main.js:4103:111)

Later log let me think it might be a more general problem and not related to vs python?

@karthiknadig
Copy link
Member

@amesser Looks like this is microsoft/node-pty#220

@ghost ghost removed the triage label Nov 11, 2019
@karthiknadig karthiknadig added reason-external and removed info-needed Issue requires more information from poster labels Nov 11, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Nov 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants