Skip to main content
3 votes
2 answers
135 views

Why won't VSCode Smart Send my Python code line by line to the terminal as it used to?

I generally just run my Python code line-by-line using the Python Smart Send feature on VSCode, but after I was away from work for a bit, it suddenly stopped working. Normally Shift + Enter or Right ...
Dillon H's user avatar
0 votes
0 answers
104 views

Pausing or adding new breakpoints halfway during running in VSCode makes the Python Exception uncaught, unhandled, and lost

Pausing or adding new breakpoints halfway during debugging in VSCode seems to make the Python Exception uncaught. The following is a minimal example to reproduce my problem. import contextlib, signal ...
hellohawaii's user avatar
  • 3,084
1 vote
1 answer
88 views

Multiple Python Paths

I have multiple Python Paths to choose from as seen in the images. I remember installing Python via brew and through the internet and Anaconda. I don't have any idea which are redundant and what to ...
Vale's user avatar
  • 33
0 votes
0 answers
90 views

Can't deactivate python venv on vscode after recent update

I've recently updated vscode to the most recent version, and whenever I open up a new shell or cmd it activates the venv in that directory, and that's fine and expected as before. But now it doesn't ...
Mohamed Hany's user avatar
1 vote
1 answer
71 views

Get current function name

Executing vscode.executeDocumentSymbolProvider gives me all symbols in the file. Can I somehow get name of the function that the cursor is currently in?
mike27's user avatar
  • 1,151
0 votes
1 answer
45 views

VSCode Failing to properly activate venvs in workspace with more than one folder/interpreter

Had an issue start with VSCode the last week or so, and not sure if there's just something wrong with my system, my vscode config, or if there's just a vscode bug. To start, I'm running on OSx Sequoia ...
Kyle Jastrick's user avatar
0 votes
0 answers
30 views

VSCode python (remote) - slow "rename symbol" when opening parent/root directories?

Given I have stored my git repos at ~/git/project1, ~/git/groupA/foo, etc. When I open the root directory ~/git with VSCode and refactor code via "rename symbol" or "rename file", ...
gebbissimo's user avatar
  • 2,749
-1 votes
1 answer
80 views

vscode extension uses wrong python

I am trying to use sqlfluff linter, which is a SQL formatter and linter. In settings.json I have, among others, this: "[sql]": { "editor.defaultFormatter": &...
Nir's user avatar
  • 2,677
1 vote
0 answers
32 views

Is there a way to have VS Code, dynamically, only process/include folders and files I have open and exclude the rest?

I have a big repo of python snippets. pyright goes crazy because I have a bunch of little folders with scripts. I don't want to have a manually turn it on/off or open specific folders as projects. I ...
red888's user avatar
  • 32.3k
0 votes
0 answers
43 views

vscode debugger highlights wrong line when adding/removing previous lines

Let's assume we have this python script, set breakpoint on second line and start debugging: print(1) print(2) # set breakpoint here print(3) print(4) print(5) Debugger stops here: Now delete the ...
Kossak's user avatar
  • 1,458
0 votes
1 answer
562 views

How do you remove a python venv from vscode?

I've added several custom virtual environments to vscode, so that when I use the command palette I can select from a variety of builtin ones, as well as my own. I'd like to remove some of these, but I ...
Zachary Turner's user avatar
2 votes
1 answer
278 views

How to set Visual Studio Code Python Interpreter to a Python Virtual Environment in a Parent Directory?

I have a python virtual environment in /Documents and a project in /Documents/Code/Python/example. I want to use this venv in my project but I can't get the vs code python interpreter to recognize ...
user24882481's user avatar
1 vote
0 answers
79 views

Pylint protected-access (W0212) warning on module functions not class methods

I receive PylintW0212:protected-access warnings when accessing functions of a module that are prefixed with a single underscore: import my_module my_module._function() # Pylint warning here The ...
user22524802's user avatar
1 vote
1 answer
214 views

$PYTHONSTARTUP points to an old version of the extension

Somehow I got myself into a state where python is complaining about PYTHONSTARTUP pointing to a non-existant path. From the terminal tab: % python Python 3.11.8 (v3.11.8:db85d51d3e, Feb 6 2024, 18:...
Roy Smith's user avatar
  • 2,177
2 votes
1 answer
1k views

How to input command line arguments when using pytest in VS Code

I have setup my pytest testing to use optional command line arguments. I would like to run and debug these tests in VS Code. However, I am unable to get the command line arguments to work with VS Code....
Matt S's user avatar
  • 67

15 30 50 per page
1
2 3 4 5
10