Che: Python Hello, World! not working, 'Terminal can not connect', breakpoints are not hit.

Created on 8 Dec 2019  路  7Comments  路  Source: eclipse/che

Describe the bug


I am a new user. Started a python workspace with the Hello, World! workspace.

I am using https://che.openshift.io/ and was directed here to file a bug report.

I set a breakpoint in the two lines of the program, and load the Python debugging configuration.
When I start debugging, the breakpoints are not hit. The _ run window shows "Hello, World!" each time I try: execution completes.

Workspace definition:
metadata:
name: wksp-7k5f
projects:

  • name: python-hello-world
    source:
    location: 'https://github.com/che-samples/python-hello-world.git'
    type: git
    branch: master
    attributes:
    persistVolumes: 'false'
    components:
  • id: ms-python/python/latest
    memoryLimit: 512Mi
    type: chePlugin
  • mountSources: true
    memoryLimit: 512Mi
    type: dockerimage
    alias: python
    image: 'quay.io/eclipse/che-python-3.7:nightly'
    apiVersion: 1.0.0
    commands:
  • name: run
    actions:

    • workdir: '${CHE_PROJECTS_ROOT}/python-hello-world'

      type: exec

      command: python hello-world.py

      component: python

When I attempt to execute the script in the debugger, I get a pop error "Terminal failed to connect. "
Contents of the output window:

Extension-Host:PLUGIN_HOST(49) starting instance
Extension-Host:PLUGIN_HOST(49): PluginManagerExtImpl/init()
Extension-Host:PLUGIN_HOST(49): initializing(@eclipse-che/[email protected] with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)
Extension-Host:PLUGIN_HOST(49): initializing(@eclipse-che/[email protected] with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)
Extension-Host:PLUGIN_HOST(49): initializing(@eclipse-che/[email protected] with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)
Extension-Host:PLUGIN_HOST(49): initializing(@eclipse-che/[email protected] with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)
Extension-Host:PLUGIN_HOST(49): initializing(@eclipse-che/[email protected] with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)
Extension-Host:PLUGIN_HOST(49): initializing([email protected] with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)
Extension-Host:PLUGIN_HOST(49): initializing(@theia/[email protected] with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js)
Extension-Host:PLUGIN_HOST(49): initializing([email protected] with /home/theia/node_modules/@theia/plugin-ext-vscode/lib/node/plugin-vscode-init.js)
Extension-Host:PLUGIN_HOST(49): PluginManagerExtImpl/loadPlugin(/tmp/vscode-unpacked/vscode-git-1.3.0.1.vsix/extension/out/main)
Extension-Host:PLUGIN_HOST(49): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/theia_yeoman_plugin.theia/lib/theia-yeoman-plugin-backend-plugin.js)
Extension-Host:PLUGIN_HOST(49): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/task_plugin.theia/lib/task-plugin-backend.js)
Extension-Host:PLUGIN_HOST(49): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/eclipse_che_welcome_plugin.theia/lib/welcome-plugin.js)
Extension-Host:PLUGIN_HOST(49): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/eclipse_che_theia_ssh_plugin.theia/lib/ssh-plugin-backend.js)
Extension-Host:PLUGIN_HOST(49): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/eclipse_che_theia_factory_plugin.theia/lib/factory-plugin.js)
Extension-Host:Error parsing configurations: error: 4, length: 0, offset: 0
Extension-Host:Error parsing configurations: error: 4, length: 0, offset: 0
Extension-Host:PLUGIN_HOST(49): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/eclipse_che_theia_containers_plugin.theia/lib/containers-plugin.js)
Extension-Host:PLUGIN_HOST(49): PluginManagerExtImpl/loadPlugin(/tmp/theia-unpacked/eclipse_che_ports_plugin.theia/lib/ports-plugin.js)
Extension-Host:Child process git stderr: Cloning into '/projects/python-hello-world'...
Extension-Host:Child process "git" exited with code 0
Extension-Host:Child process "git" exited with code 0
Extension-Host:Child process "git" exited with code 0
Extension-Host:Child process "git" exited with code 0
Extension-Host:Child process "git" exited with code 0
Extension-Host:The port 39202 is no longer listening on interface 127.0.0.1
Extension-Host:The port 35400 is no longer listening on interface 127.0.0.1
Extension-Host:The port 41325 is no longer listening on interface 127.0.0.1

Che version

Che-Theia@ad8e4f4 using Theia@f255f5a8

Steps to reproduce

Make a new python workspace.

Expected behavior

Runtime

  • [ ] kubernetes (include output of kubectl version)
  • [ ] Openshift (include output of oc version)
  • [ ] minikube (include output of minikube version and kubectl version)
  • [ ] minishift (include output of minishift version and oc version)
  • [ ] docker-desktop + K8S (include output of docker version and kubectl version)
  • [ ] other: (please specify)

Screenshots

Installation method

  • [ ] chectl
  • [ ] che-operator
  • [ ] minishift-addon
  • [ ] I don't know

Environment

  • [ ] my computer

    • [ ] Windows

    • [ ] Linux

    • [ ] macOS

  • [ ] Cloud

    • [ ] Amazon

    • [ ] Azure

    • [ ] GCE

    • [ ] other (please specify)

  • [ ] other: please specify

Additional context

arelanguages kinquestion statuanalyzing tealanguages

All 7 comments

@timrichardson
Make sure you use internalConsole in a debug configuration.
Supporting of integrationTerminal hasn't been deployed yet.

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Python: Current File",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "internalConsole"
        }
    ]
}

@ibuziuk
integratedTerminal has been recently added in Theia but we don't have it yet on che.openshift.io.

.... leaving me confused. It's 'hello world', it should just work :)

/cc @tsmaeder

Removing osio label since this is not Hosted Che specific

.... leaving me confused. It's 'hello world', it should just work :)

As VS Code API evolves, extensions start using new API's. So we are playing a game of catch-up with the good folks at Microsoft. Support for using integratedTerminal debug configuration has recently been added to Che/Theia, but is not yet deployed on che.openshift.io. Sometimes it makes sense to use a newer version of a VS Code extension, even though some things need to be worked around.
The workaround is to edit the python debug configuration you're using and change integratedTerminal to internalConsole.

well, cool, that works, thanks

Was this page helpful?
0 / 5 - 0 ratings