Skip to content

Python debugging doesn't work in ColabCode (via ngrok and Google Colab) #2783

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

Closed
krivenkoz opened this issue Feb 26, 2021 · 7 comments
Closed
Labels
bug Something isn't working extension The issue needs to be fixed in the extension waiting-for-info Waiting for more information from submitter
Milestone

Comments

@krivenkoz
Copy link

I'm using amazing ColabCode by Abhishek Thakur. It uses ngrok as backbone and Google Colab as "frontend". But when I try to debug Python script, it doesn't launch any debug action. launch.json is empty. When I fill it with next:

"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}

]

I've got next error:

Couldn't find a debug adapter descriptor for debug type 'python' (extension might have failed to activate). Python extension installed properly. Script runs in terminal only (not by F5 button).

How can I debug Python script on ngrok code-server?

@jsjoeio
Copy link
Contributor

jsjoeio commented Feb 26, 2021

HI @krivenkoz ! Can you please fill out the issue template?

And can you provide reproduction steps? I'm not super familiar with ColabCode.

And lastly, have you tried debugging a Python script when not using ColabCode? Wondering if there may be an underlying issue.

@jsjoeio jsjoeio added the waiting-for-info Waiting for more information from submitter label Feb 26, 2021
@ddurham2
Copy link

ddurham2 commented Mar 13, 2021

@jsjoeio, I'm seeing the same thing with just code-server 3.9.1 and the latest ms-python extension installed.
creating test.py simply

print('hello world')

and creating launch.json as

{
    // 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": "integratedTerminal"
        }
    ]
}

Press F5 in test.py and it fails with the above error message. Worse, I don't see any log output anywhere explaining the issue. Please help.

@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 15, 2021

Hey @ddurham2 - thanks for letting us know! Just to clarify, I should be able to reproduce following these steps?

  1. install latest version of code-server 3.9.1
  2. install the latest ms-python extension
  3. create test.py
  4. crate launch.json (using what you have above)
  5. hit F5 in test.py

Expected

I don't use Python much these days and also haven't tried debugging it in VS Code/code-server so I'm not sure what should happen?

Actual

Couldn't find a debug adapter descriptor for debug type 'python' (extension might have failed to activate). 
Python extension installed properly. Script runs in terminal only (not by F5 button).

Possibly related to:

@ddurham2
Copy link

Yes, precisely. And I think #2341 is what I should focus on, and possibly this issue's fundamental cause too.

I have learned since that if you look in the browser dev console that this behavior is caused by the ms-toolsai.jupyter failing to load. That seems to be because it's missing some files in the extension ( /home/coder/.local/share/code-server/extensions/ms-toolsai.jupyter-2021.2.0/out/client/* )

I think #2341 already has discovered this.

Also, I've found that [email protected] is the version just before they started requiring the ms-toolsai.jupyter extension. I'm currently having to stick with code-server v3.7.1 (due to #2626 ) and specify this version of the ms-python plugin.

@jsjoeio jsjoeio added this to the v3.9.3 milestone Mar 15, 2021
@jsjoeio jsjoeio added bug Something isn't working and removed waiting-for-info Waiting for more information from submitter labels Mar 15, 2021
@jsjoeio
Copy link
Contributor

jsjoeio commented Mar 15, 2021

Awesome! Thanks for the additional info. I've added this to the next milestone so hopefully we can figure this out!

@ddurham2
Copy link

@krivenkoz The latest python extension is now working in 3.9.1. You might check if your issue is resolved.

@jsjoeio jsjoeio modified the milestones: v3.9.3, On Deck Apr 8, 2021
@oxy oxy added extension The issue needs to be fixed in the extension waiting-for-info Waiting for more information from submitter labels Jun 18, 2021
@stale
Copy link

stale bot commented Dec 15, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label Dec 15, 2021
@stale stale bot closed this as completed Dec 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working extension The issue needs to be fixed in the extension waiting-for-info Waiting for more information from submitter
Projects
None yet
Development

No branches or pull requests

4 participants