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.

Debugging in python 3.6 broken

See original GitHub issue

Issue Type: Bug

Behaviour

Short: debugging with python 3.6 not working in version 2022.10.0. But working with python 3.9. And in 2022.8.1 or 2021.6… debugging with 3.6 works too.

Yesterday after windows restart, debugging in my project, based on python 3.6 (conda virtual environment), was broken. It did not run even in new project with only one file contain “print(‘test’)”. Running without debugging worked fine. Debugging in python 3.9 worked fine too. I tested it on second pc (win 10), same result. After a day of experiments I found that with older version of python plugin, than latest 2022.10.0, debugging in python 3.6 working fine. Before manipulations with plugin I tried to reinstall python, vs code, venv, clean path, create project in another directories, starting of vs code as administrator and all other reasonable actions, that I googled. Without success. Advice to try older version of plugin I foung in some very old message, and it’s working… Magic. Sorry for my English, that even don’t allow me to read issue reporting instruction) Hope that nobody else will not loose his day for this investigation.

Steps to reproduce:

install plugin “Python” version 2022.10.0 (just latest now) to VS Code. Create conda environment with python 3.6 Create project folder with file like “test.py”, write “print(‘test’)” in it. (choose created before environment) Try to start debugging

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.13 :: Anaconda, Inc.
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): virt-conda
  • Value of the python.languageServer setting: Default
"Python" channel in the OUTPUT panel

Error 2022-07-11 09:27:28: Detection of Python Interpreter for Command python3 and args  failed as file  does not exist
Error 2022-07-11 09:27:28: Detection of Python Interpreter for Command python and args  failed as file  does not exist
Error 2022-07-11 09:27:28: Failed to get interpreter information for 'C:\Users\Victo\AppData\Local\Microsoft\WindowsApps\python3.exe' [Error: Command failed: "C:\\Users\Victo\AppData\Local\Microsoft\WindowsApps\python3.exe" "c:\Users\Victo\.vscode\extensions\ms-python.python-2021.6.944021595\pythonFiles\interpreterInfo.py"
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

	at ChildProcess.exithandler (node:child_process:406:12)
	at ChildProcess.emit (node:events:390:28)
	at maybeClose (node:internal/child_process:1064:16)
	at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)] {
  killed: false,
  code: 9009,
  signal: null,
  cmd: '"C:\\\\Users\\Victo\\AppData\\Local\\Microsoft\\WindowsApps\\python3.exe" "c:\\Users\\Victo\\.vscode\\extensions\\ms-python.python-2021.6.944021595\\pythonFiles\\interpreterInfo.py"'
}
Error 2022-07-11 09:27:28: Failed to get interpreter information for 'C:\Users\Victo\AppData\Local\Microsoft\WindowsApps\python.exe' [Error: Command failed: "C:\\Users\Victo\AppData\Local\Microsoft\WindowsApps\python.exe" "c:\Users\Victo\.vscode\extensions\ms-python.python-2021.6.944021595\pythonFiles\interpreterInfo.py"
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

	at ChildProcess.exithandler (node:child_process:406:12)
	at ChildProcess.emit (node:events:390:28)
	at maybeClose (node:internal/child_process:1064:16)
	at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)] {
  killed: false,
  code: 9009,
  signal: null,
  cmd: '"C:\\\\Users\\Victo\\AppData\\Local\\Microsoft\\WindowsApps\\python.exe" "c:\\Users\\Victo\\.vscode\\extensions\\ms-python.python-2021.6.944021595\\pythonFiles\\interpreterInfo.py"'
}
Error 2022-07-11 09:27:29: Failed to check if file needs to be fixed [EntryNotFound (FileSystemError): Unable to read file 'c:\Projects\Server\V3_adopted\.vscode\settings.json' (Error: Unable to resolve nonexistent file 'c:\Projects\Server\V3_adopted\.vscode\settings.json')
	at Function._handleError (c:\Users\Victo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:29443)
	at Object.readFile (c:\Users\Victo\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:87:28357)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async y.readText (c:\Users\Victo\.vscode\extensions\ms-python.python-2021.6.944021595\out\client\extension.js:9:343940)
	at async p.doesFileNeedToBeFixed (c:\Users\Victo\.vscode\extensions\ms-python.python-2021.6.944021595\out\client\extension.js:59:581700)
	at async c:\Users\Victo\.vscode\extensions\ms-python.python-2021.6.944021595\out\client\extension.js:59:580827
	at async Promise.all (index 1)
	at async p.getFilesToBeFixed (c:\Users\Victo\.vscode\extensions\ms-python.python-2021.6.944021595\out\client\extension.js:59:580773)
	at async p.updateTestSettings (c:\Users\Victo\.vscode\extensions\ms-python.python-2021.6.944021595\out\client\extension.js:59:580400)] {
  code: 'FileNotFound'
}

Extension version: 2021.6.944021595 VS Code version: Code 1.69.0 (92d25e35d9bf1a6b16f7d0758f25d48ace11e5b9, 2022-07-07T05:28:36.503Z) OS version: Windows_NT x64 10.0.22000 Restricted Mode: No

System Info
Item Value
CPUs AMD Ryzen 7 5800H with Radeon Graphics (16 x 3194)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 31.41GB (20.65GB free)
Process Argv –crash-reporter-id 5d4fda30-a5de-45e3-93ee-c6a3e6b71f31
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonvspyt551:30345470
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
vsclangdc:30486549

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:14
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
karthiknadigcommented, Jul 12, 2022

debugpy dropped support for python 3.6 (since it is out of service for about 6 months now). Please pin to 2022.08.* version of the extension which was the last version with 3.6 support.

1reaction
sicxucommented, Jul 11, 2022

Same issue! After switching back to an old plugin version (v2022.8.1), the debugging works again. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code Debugger not working for python
When VS Code was updated to 1.64.0 it seems to have broken Python debugging. Clicking on "Run Python File" works fine.
Read more >
pdb — The Python Debugger
The module pdb defines an interactive source code debugger for Python programs. It supports setting (conditional) breakpoints and single stepping at the ...
Read more >
Python Debugging With Pdb
In this hands-on tutorial, you'll learn the basics of using pdb, Python's interactive source code debugger. Pdb is a great tool for tracking...
Read more >
Python debugger not working while normal run does
The python debugger in Pycharm (I've the latest version) is not working for any Python file (so it's not my project or anything)....
Read more >
Broken breakpoints in PyCharm - python 3.6
Whenever I run my Pycharm project in Debug mode my breakpoints trigger, but only for a second. Execution then continues automatically. I get...
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