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

Python debugging not working again #12485

Closed
farhanpurdi opened this issue Jun 22, 2020 · 5 comments
Closed

Python debugging not working again #12485

farhanpurdi opened this issue Jun 22, 2020 · 5 comments
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@farhanpurdi
Copy link

Environment data

Version: 1.46.1 (user setup)
Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
Date: 2020-06-17T21:13:20.174Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.10240

Type Issue : BUG

same issue like #7927. i've checked my extension and it has already newest but python debugging still not working.

@farhanpurdi farhanpurdi added triage-needed Needs assignment to the proper sub-team bug Issue identified by VS Code Team member as probable bug labels Jun 22, 2020
@emante50
Copy link

Many people seem to be running into this (including myself). Similar symptoms as you describe. It seems to have to do with a change in the debugger which they are running AB tests on.

Symptoms

My own Error Message says:
Debugger Error: The number of constructor arguments in the derived class s must be >= than the number of constructor arguments of its base class.

My setup

code-server: v3.4.1
VS Code: v1.45.1
Commit: 48f7c2724827e526eeaa6c2c151c520f48a61259
Date: 2020-06-04T10:39:14Z
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0

The following seem related issues:

code-server (which uses vs-code)

coder/code-server#1818
coder/code-server#1821

Possibly related command 'python.setInterpreter' not found

Workaround:
I tried a LOT of different options (rolling back to prior releases of ms-python, uninstalling, deleting all remnants I could find, switching off AB test participation, editing launch.json with different path variables, and editing experiments.json etc.).

What seems to help is:

  • Rolling back to version: 2020.5.86806

Another solution to keep an eye on is editing the experiments.json file to switch off the AB testing (or to configure it the way you want)

This json file controls the AB testing. For specific tests, it defines "branches" and probabilities (min and max) for picking that branch. Sometime there are multiple branches, often just 2. The names indicated what is legacy (control) and what is experimental. As I wanted to have the legacy options, I set min-max as 0-100 for the control (i.e. legacy) code and min-max as 0-0 for the experiments.

I based this on this post: #12484
and the solution: da85a76

Note: The OP of issue #12484 wanted to go 100% for the experimental version. I went the other way.

The file name (and partial path):
... extensions/ms-python.python-2020.6.89148/experiments.json

The settings I went with:

[
{
"name": "AlwaysDisplayTestExplorer - experiment",
"salt": "AlwaysDisplayTestExplorer",
"min": 0,
"max": 0
},
{
"name": "AlwaysDisplayTestExplorer - control",
"salt": "AlwaysDisplayTestExplorer",
"min": 0,
"max": 100
},
{
"name": "ShowPlayIcon - start",
"salt": "ShowPlayIcon",
"max": 100,
"min": 0
},
{
"name": "ShowExtensionSurveyPrompt - enabled",
"salt": "ShowExtensionSurveyPrompt",
"max": 0,
"min": 0
},
{
"name": "ShowExtensionSurveyPrompt - control",
"salt": "ShowExtensionSurveyPrompt",
"min": 0,
"max": 100
},
{
"name": "DebugAdapterFactory - control",
"salt": "DebugAdapterFactory",
"min": 0,
"max": 100
},
{
"name": "DebugAdapterFactory - experiment",
"salt": "DebugAdapterFactory",
"min": 0,
"max": 0
},
{
"name": "PtvsdWheels37 - control",
"salt": "DebugAdapterFactory",
"min": 0,
"max": 100
},
{
"name": "PtvsdWheels37 - experiment",
"salt": "DebugAdapterFactory",
"min": 0,
"max": 0
},
{
"name": "Reload - control",
"salt": "DebugAdapterFactory",
"min": 0,
"max": 100
},
{
"name": "Reload - experiment",
"salt": "DebugAdapterFactory",
"min": 0,
"max": 0
},
{
"name": "LS - enabled",
"salt": "LS",
"min": 0,
"max": 0
},
{
"name": "LS - control",
"salt": "LS",
"min": 0,
"max": 24
},
{
"name": "UseTerminalToGetActivatedEnvVars - experiment",
"salt": "UseTerminalToGetActivatedEnvVars",
"min": 0,
"max": 0
},
{
"name": "UseTerminalToGetActivatedEnvVars - control",
"salt": "UseTerminalToGetActivatedEnvVars",
"min": 0,
"max": 100
},
{
"name": "AA_testing - control",
"salt": "AA_testing",
"min": 0,
"max": 100
},
{
"name": "AA_testing - experiment",
"salt": "AA_testing",
"min": 0,
"max": 0
},
{
"name": "WebHostNotebook - experiment",
"salt": "WebHostNotebook",
"max": 0,
"min": 0
},
{
"name": "WebHostNotebook - control",
"salt": "WebHostNotebook",
"min": 0,
"max": 100
},
{
"name": "LocalZMQKernel - experiment",
"salt": "LocalZMQKernel",
"max": 0,
"min": 0
},
{
"name": "LocalZMQKernel - control",
"salt": "LocalZMQKernel",
"min": 0,
"max": 100
},
{
"name": "NativeNotebook - experiment",
"salt": "NativeNotebook",
"max": 0,
"min": 0
},
{
"name": "NativeNotebook - control",
"salt": "NativeNotebook",
"min": 0,
"max": 100
},
{
"name": "CollectLSRequestTiming - experiment",
"salt": "CollectLSRequestTiming",
"min": 0,
"max": 10
},
{
"name": "CollectLSRequestTiming - control",
"salt": "CollectLSRequestTiming",
"min": 10,
"max": 100
},
{
"name": "CollectNodeLSRequestTiming - experiment",
"salt": "CollectNodeLSRequestTiming",
"min": 0,
"max": 100
},
{
"name": "CollectNodeLSRequestTiming - control",
"salt": "CollectNodeLSRequestTiming",
"min": 0,
"max": 0
},
{
"name": "EnableIPyWidgets - experiment",
"salt": "EnableIPyWidgets",
"min": 0,
"max": 100
},
{
"name": "EnableIPyWidgets - control",
"salt": "EnableIPyWidgets",
"min": 0,
"max": 0
},
{
"name": "DeprecatePythonPath - experiment",
"salt": "DeprecatePythonPath",
"min": 0,
"max": 4
},
{
"name": "DeprecatePythonPath - control",
"salt": "DeprecatePythonPath",
"min": 96,
"max": 100
},
{
"name": "RunByLine - control",
"salt": "RunByLine",
"min": 0,
"max": 100
},
{
"name": "RunByLine - experiment",
"salt": "RunByLine",
"max": 0,
"min": 0
},
{
"name": "CustomEditorSupport - control",
"salt": "CustomEditorSupport",
"min": 0,
"max": 100
},
{
"name": "CustomEditorSupport - experiment",
"salt": "CustomEditorSupport",
"max": 0,
"min": 0
}
]

@pmCrawler
Copy link

I ran into the same issue while debugging a Flask REST application in WSL1 (pipenv), with the latest version of the extension - v2020.6.89148.

I'm using the REST Client extension (0.24.1) to debug.

After fiddling around with a bunch 'python.xxx' user settings I finally got it to work, for the time being, using the following User settings:

  1. "python.languageServer": "Microsoft"
  2. "python.workspaceSymbols.enabled": true
  3. "python.venvPath": "~/.local/share/virtualenvs".

Though I'm not sure if venvPath setting had any real impact but it was added, nonetheless.

BTW, the option to "Install Another Version" returned "Server returned 404".

Hope this helps.

@farhanpurdi
Copy link
Author

i just reinstall the extension and it works again. thanks guys

@ghost ghost removed the triage-needed Needs assignment to the proper sub-team label Jun 22, 2020
@danielmacuare
Copy link

For those having this issue: #7927 I tried everything and even this #7836 (comment) but nothing worked for me.

After spending hours troubleshooting what worked for me was to delete some folders in my workspace. Not sure what the problem was but that fixed my problem.

@circles-png
Copy link

circles-png commented Sep 10, 2021

I have the same problem, it started not working yesterday, after I created a launch.json file to add "justMyCode": false

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 4, 2021
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

5 participants