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 does not work with a conda environment

See original GitHub issue

Issue Type: Bug

Behaviour

While debugging Python scripts, F5 or “Play button” gives no action - the only thing I see is bar with “stop”, “play” and “restart” buttons - but this bar just dissapear after few seconds. In terminal no output is printed. Since last successful debugging session no system updates or other apps were installed, VSCode is up-to-date. I have tried restarting VSCode and restarting computer 😉

Linked with: https://github.com/microsoft/vscode/issues/142154

Expected vs. Actual

Expected: Press F5 button runs code in debug mode. Actual: After pressing F5 button only “debug bar” appears, but code does not run at all.

Steps to reproduce:

  1. Open VSCode
  2. Open *.py file
  3. Press F5 or “play button” in “Run and debug” section on the left-side-bar of VSCode app window.
launch.json { "version": "0.2.0", "configurations": [ { "name": "Python: Current File", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal", "justMyCode": false } ] }

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.7.7
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Pylance
User Settings


defaultLS: {"defaultLSType":"Pylance"}

downloadLanguageServer: true

envFile: "<placeholder>"

venvPath: "<placeholder>"

venvFolders: "<placeholder>"

condaPath: "<placeholder>"

pipenvPath: "<placeholder>"

poetryPath: "<placeholder>"

languageServer: "Pylance"

linting
• enabled: true
• cwd: "<placeholder>"
• Flake8Args: "<placeholder>"
• flake8Enabled: true
• flake8Path: "<placeholder>"
• lintOnSave: true
• banditArgs: "<placeholder>"
• banditEnabled: false
• banditPath: "<placeholder>"
• mypyArgs: "<placeholder>"
• mypyEnabled: false
• mypyPath: "<placeholder>"
• pycodestyleArgs: "<placeholder>"
• pycodestyleEnabled: false
• pycodestylePath: "<placeholder>"
• prospectorArgs: "<placeholder>"
• prospectorEnabled: false
• prospectorPath: "<placeholder>"
• pydocstyleArgs: "<placeholder>"
• pydocstyleEnabled: false
• pydocstylePath: "<placeholder>"
• pylamaArgs: "<placeholder>"
• pylamaEnabled: false
• pylamaPath: "<placeholder>"
• pylintArgs: "<placeholder>"
• pylintPath: "<placeholder>"

sortImports
• args: "<placeholder>"
• path: "<placeholder>"

formatting
• autopep8Args: "<placeholder>"
• autopep8Path: "<placeholder>"
• provider: "autopep8"
• blackArgs: "<placeholder>"
• blackPath: "<placeholder>"
• yapfArgs: "<placeholder>"
• yapfPath: "<placeholder>"

testing
• cwd: "<placeholder>"
• debugPort: 3000
• nosetestArgs: "<placeholder>"
• nosetestsEnabled: undefined
• nosetestPath: "<placeholder>"
• promptToConfigure: true
• pytestArgs: "<placeholder>"
• pytestEnabled: false
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: false
• autoTestDiscoverOnSaveEnabled: true

terminal
• activateEnvironment: true
• executeInFileDir: "<placeholder>"
• launchArgs: "<placeholder>"

experiments
• enabled: true
• optInto: []
• optOutFrom: []

insidersChannel: "off"

tensorBoard
• logDirectory: "<placeholder>"

Extension version: 2022.0.1786462952 VS Code version: Code 1.64.0 (5554b12acf27056905806867f251c859323ff7e9, 2022-02-03T04:22:20.678Z) OS version: Windows_NT x64 10.0.19042 Restricted Mode: No

System Info
Item Value
CPUs Intel® Core™ i5-8250U CPU @ 1.60GHz (8 x 1800)
GPU Status 2d_canvas: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: enabled
opengl: enabled_on
rasterization: enabled
skia_renderer: enabled_on
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.90GB (8.45GB free)
Process Argv –folder-uri file:///c%3A/Users/Pawe%C5%82%20Fic/Documents/MOLOS.ANALYTICS/Packages/trend_analysis --crash-reporter-id b5861c78-63a8-433f-adf7-5b3b6a81c16d
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392cf:30425750
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30433059
pythonvs932:30410667
vscop940:30404999
vsrem710cf:30416617

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:21
  • Comments:51 (14 by maintainers)

github_iconTop GitHub Comments

12reactions
ajrockcommented, Feb 4, 2022

Having the same problem since the update to v2022.0.1786462952

6reactions
karthiknadigcommented, Feb 4, 2022

@bernardo-suez Please check your conda version, if it is below 4.9.0 update to the latest version, and see if it helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Conda and Visual Studio Code debugging - python
Open Anaconda Navigator · Select the environment here on Applications on _[your environment's name]_ (picture) · Launch VSCode · Run the Debug ......
Read more >
VSCode Debugging - Anaconda Environments - YouTube
We cover how to debug in Anaconda Environments in VSCode by-... ... try restarting your device. Your browser can't play this video.
Read more >
Using Python environments in VS Code
Using Python environments in VS Code. This article discusses the helpful Python environments features available in Visual Studio Code. An "environment" in ...
Read more >
Debugging conda recipes — conda-build 3.23.3+5 ...
Fundamentally, debugging is a process of getting into or recreating the environment and set of shell environment variables that conda-build creates during its ......
Read more >
HOWTO: Use a Conda/Virtual Environment With Jupyter
Install Jupyterlab Debugger kernel ... 3. open a notebook with the debugger kernel. 4. you can enable debug mode at upper-right kernel of...
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 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