lohaent.blogg.se

Debugging python in visual studio code
Debugging python in visual studio code













debugging python in visual studio code
  1. DEBUGGING PYTHON IN VISUAL STUDIO CODE HOW TO
  2. DEBUGGING PYTHON IN VISUAL STUDIO CODE INSTALL

The problem and the end should have been the problem of the python plug-in at that time. Of course, the python library is also the library in the other environment Interestingly, when I exchange the python paths of two virtual environments, I can use the debugging function normally. However, after pressing F5 to debug, you still run the code directly (I didn’t say before that this process is slower than running the script directly)

DEBUGGING PYTHON IN VISUAL STUDIO CODE INSTALL

  • Reset vscode but use workspace settings "python.pythonPath": "/home/gos/pyStudy/venv/bin/python"Īfter testing, vscode and python extensions are found donjayamanne.python Can correctly identify the virtual environment, and automatically use pip to install pylint for the virtual environment.
  • Originally, I wanted to test whether it was a problem of creating tools, but I found it interesting. Test - using traditional virtualenv tools to create: virtualenv test Venv - created with pyvenv tool of Python 3: python -m venv venv
  • Two virtual environments were recreated:.
  • Start vscode in a normal environment instead of a virtual environment.
  • The default settings of vscode are restored, and the path of Python in “user settings” is deleted.
  • debugging python in visual studio code

    I did the following operation and try, and found an interesting thing: The problem hasn’t been solved yet, but thank you provide help, follow the prompts. Hover to see a description of an existing property. Use IntelliSense to understand related properties.

    debugging python in visual studio code

    } # launch.json This one should have been generated automatically. "python.pythonPath": "~/pyStudy/venv/bin/python", The configuration files include: # setting.json Seek a solution, or are they all like this? This is not scientific! The toolbar has no response except to stop. Start vscode either way (the last symptom is the same).Īfter clicking F5, although the debugging toolbar will appear, the code is executed directly, which is the same as running the code directly. Starting vscode in virtualenv environment can’t debug normally.Īfter entering the virtual environment with the terminal, start vscode or specify the interpreter location in the settings " python.pythonPath Virtual directory / bin / Python“. As a result, I encountered a problem today.

    DEBUGGING PYTHON IN VISUAL STUDIO CODE HOW TO

    Recently, I installed vscode and wanted to learn how to write python with it.















    Debugging python in visual studio code