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.

F5 debug file does not work

See original GitHub issue

Type: Bug

Behaviour

Expected

  • Pressing F5 should debug the current file.
  • Switching to the “Run and Debug” tab and pressing the big blue “Run and Debug” button should debug the current file.

Actual

  • Pressing F5 does not debug the current file.
  • Switching to the “Run and Debug” tab and pressing the big blue “Run and Debug” button does not debug the current file.

Steps to reproduce:

Create empty folder in Windows File Explorer. Open folder in vscode. Create new file test.py with content: print(“hello”) Select interpreter. I’m using a conda env.

Press F5. File is not run.

Alternatively you could switch to the “Run and Debug” tab and press the big blue “Run and Debug” button. File is not run.

In the top right part of the editor is a button where you can select between “Run Python File” and “Debug Python File”. The “Run Python File” command works. It runs the file. The “Debug Python File” command does not work.

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.10.0
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Conda
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

Experiment 'pythonaacf' is active
LSP Notebooks experiment is enabled
LSP Notebooks interactive window support is enabled
> conda info --json
Python interpreter path: ~\anaconda3\envs\adventofcode\python.exe
> ~\anaconda3\Scripts\conda.exe info --json
> ~\anaconda3\condabin\conda.bat info --json
> ~\anaconda3\Scripts\conda.exe run -n adventofcode --no-capture-output python ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~/.vscode/extensions/ms-python.python-2022.18.1/pythonFiles/printEnvVariables.py
> ~\anaconda3\python.exe ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\adventofcode\python.exe ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\blocket\python.exe ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\interpreterInfo.py
> ~\anaconda3\condabin\conda.bat run -n adventofcode --no-capture-output python ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\codingame\python.exe ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\considition\python.exe ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\gmail\python.exe ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\google\python.exe ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\ldm\python.exe ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\price-tracker\python.exe ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\pygame\python.exe ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\pyspark\python.exe ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\interpreterInfo.py
> ~\anaconda3\envs\tmp\python.exe ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\interpreterInfo.py
Starting Pylance language server.
> ~\anaconda3\Scripts\conda.exe run -n adventofcode --no-capture-output python ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\get_output_via_markers.py ~\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\linter.py -m flake8 --max-line-length=150 --ignore=E203,W503 .\tmp.py
cwd: .
##########Linting Output - flake8##########


DAP Server launched with command: C:\Users\johan\anaconda3\envs\adventofcode\python.exe c:\Users\johan\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\lib\python\debugpy\adapter
DAP Server launched with command: C:\Users\johan\anaconda3\envs\adventofcode\python.exe c:\Users\johan\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\lib\python\debugpy\adapter
DAP Server launched with command: C:\Users\johan\anaconda3\envs\adventofcode\python.exe c:\Users\johan\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\lib\python\debugpy\adapter
DAP Server launched with command: C:\Users\johan\anaconda3\envs\adventofcode\python.exe c:\Users\johan\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\lib\python\debugpy\adapter
DAP Server launched with command: C:\Users\johan\anaconda3\envs\adventofcode\python.exe c:\Users\johan\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\lib\python\debugpy\adapter
DAP Server launched with command: C:\Users\johan\anaconda3\envs\adventofcode\python.exe c:\Users\johan\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\lib\python\debugpy\adapter
DAP Server launched with command: C:\Users\johan\anaconda3\envs\adventofcode\python.exe c:\Users\johan\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\lib\python\debugpy\adapter
DAP Server launched with command: C:\Users\johan\anaconda3\envs\adventofcode\python.exe c:\Users\johan\.vscode\extensions\ms-python.python-2022.18.1\pythonFiles\lib\python\debugpy\adapter

User Settings


languageServer: "Pylance"

linting
• flake8Args: "<placeholder>"
• flake8Enabled: true

formatting
• provider: "black"
• blackArgs: "<placeholder>"

Extension version: 2022.18.1 VS Code version: Code 1.73.0 (8fa188b2b301d36553cbc9ce1b0a146ccb93351f, 2022-11-01T15:34:06.111Z) OS version: Windows_NT x64 10.0.19045 Modes: Sandboxed: No

System Info
Item Value
CPUs Intel® Core™ i5-4690K CPU @ 3.50GHz (4 x 3506)
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
webgpu: disabled_off
Load (avg) undefined
Memory (System) 15.94GB (8.10GB free)
Process Argv C:\git\adventofcode\2020 --crash-reporter-id 02bf212e-45b5-47ee-9998-7f04c503acf8
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
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
vscccc:30566498
pyindex848cf:30577861
nodejswelcome1:30587005
fc301958:30595537
2e4cg342:30602488
gswce2:30605431
3d0df643:30604793
dbltrim-noruby:30604474

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
karrtikrcommented, Nov 10, 2022

Conda python environment 3.10.0 was particularly faulty, in the sense that it did not allow to use the path to python executable without activating conda environment. They fixed the issue in the later versions which is why your issue got fixed on updating.

0reactions
johanrexcommented, Nov 10, 2022

The particular conda environment I used was created ~1 year ago using python 3.10.0. I did conda update python which fixed the issue. It updated from 3.10.0 to 3.10.6. I can now debug in this environment.

@karrtikr If there’s recently been changes to how conda environments are handled that may be a clue why it suddenly stopped working after installing 2022.18.0 of the extension. I.e. older conda environments behave differently than newer. That’s my hypothesis at least. I tried 2022.18.2 as well but the problem persisted. The only solution that worked was to update the conda environment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Enabling Debug on BIG-IP System Processes For F5 Support
Enabling debugging should only be performed when asked to do so by F5 Support. Environment. BIG-IP; Administrative access to the BIG-IP command ...
Read more >
Enabling debug logging and gathering diagnostic data for F5 ...
This article highlights the different methods to gather diagnostic data to troubleshoot VPN access issues while connecting with the F5 Access ...
Read more >
Troubleshooting issues with log rotation and archiving - AskF5
Log rotation and archiving of logs may not work as expected; Log entries ... Files under /var/log may be consuming all available disk...
Read more >
Troubleshooting and debugging Enterprise Manager iControl ...
Issue. When diagnosing issues with Enterprise Manager iControl communications, begin by ensuring that NTP communications are configured and ...
Read more >
Troubleshooting - F5 Cloud Docs
Also, check the logs for any issues sending the data to the third party tool. If all trace files look correct, then check...
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