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.

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

See original GitHub issue

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/ports-plugin@7.3.2 with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js) Extension-Host:PLUGIN_HOST(49): initializing(@eclipse-che/theia-containers-plugin@7.3.2 with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js) Extension-Host:PLUGIN_HOST(49): initializing(@eclipse-che/theia-factory-plugin@7.3.2 with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js) Extension-Host:PLUGIN_HOST(49): initializing(@eclipse-che/theia-ssh-plugin@7.3.2 with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js) Extension-Host:PLUGIN_HOST(49): initializing(@eclipse-che/welcome-plugin@7.3.2 with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js) Extension-Host:PLUGIN_HOST(49): initializing(task-plugin@7.3.2 with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js) Extension-Host:PLUGIN_HOST(49): initializing(@theia/yeoman-plugin@0.0.1-1562576566 with /home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/scanners/backend-init-theia.js) Extension-Host:PLUGIN_HOST(49): initializing(git@1.0.0 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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
timrichardsoncommented, Dec 9, 2019

… leaving me confused. It’s ‘hello world’, it should just work 😃

1reaction
tolushacommented, Dec 9, 2019

@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"
        }
    ]
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugger Not Stopping at Breakpoints in VS Code for Python
I am using VS Code on a Windows 10 PC with Python 3.7. 3 and the Python extension installed. I followed the instructions...
Read more >
Breakpoints not hit. · Issue #12593 · microsoft/vscode-python
When I place a breakpoint at any line in the soure, the break point is not being hit. I set the break point...
Read more >
Debugging in Visual Studio Code
One of the great things in Visual Studio Code is debugging support. Set breakpoints, step-in, inspect variables and more.
Read more >
Troubleshooting | PyCharm Documentation - JetBrains
Troubleshooting tips, known workarounds, first-aid PyCharm diagnostics. ... Python code is not highlighted in the Editor.
Read more >
How to Debug Python with VSCode - YouTube
In this short tutorial I want to show you how to debug Python scripts with VSCode. I explain simple and conditional breakpoints, and...
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