visual-studio-code

vscode extensions need to re-install when I connect next time

vscode extensions need to re-install when I connect next time Question: When I use vscode Remote-SSH, I install some extensions in SSH server. But when I connect ssh several days later, the extensions have disappeared which means I have to install again. vscode-extensions like these: Python Pylance Asked By: luhao || Source Answers: As far …

Total answers: 1

why it says I don't have admin privilage to install chatterbot?

why it says I don't have admin privilage to install chatterbot? Question: I tried to install chatterbot on my up to date python, pip didn’t work, everything including running as administrator and every other thing that I don’t remember. so I went to here: C:UsersaliAppDataLocalPackagesPythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0 with CMD, and did a git clone thing and a …

Total answers: 1

launch.json breaks debugging in VSCode

launch.json breaks debugging in VSCode Question: I wanted to set justMyCode to false for a python project in VSCode. So I created a launch.json file in a .vscode folder under the project root folder with the following content: { "configurations": [ { "name": "Python: Current File", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal", // …

Total answers: 1

ModuleNotFoundError while using GitHub codespace editor

ModuleNotFoundError while using GitHub codespace editor Question: Recently I started using GitHub codespace for the first time. I created a new codespace from one of my repositories. Assuming the folder structure as below: my-codespace |— utils |—— my_script.py |— config.py I get the following error when I import config.py inside my_script.py: ModuleNotFoundError: No module named …

Total answers: 2

Use file input(stdin) in VS Code debug argument

Use file input(stdin) in VS Code debug argument Question: I have a script that accepts multiple arguments and takes a file input(stdin) as one of the last argument. Tried debugging the script in VS Code debugger. But the file input arg is not working. The script doesn’t understand the fourth argument in the launch.json. here’s …

Total answers: 1

Python code boilerplate generation/editing like in Sublime for VS Code

Python code boilerplate generation/editing like in Sublime for VS Code Question: In a Sublime .py file when you type the letter c you get a suggestion for a new class. Press Tab and you get with the multicursor adequately set. How do you do this in VS Code? The py plugin with IntelliSense only fills …

Total answers: 1

VSCode does not recognize my Flask dependency installed with Poetry

VSCode does not recognize my Flask dependency installed with Poetry Question: I am learning how to use VSCode for Python development by building a simple Flask app. I use Poetry for dependency management. I have a simple app.py where I’m importing flask and defining a basic route like so: from flask import Flask app = …

Total answers: 1

F12 VSCode (Go To Definition) pointing to the wrong module

F12 VSCode (Go To Definition) pointing to the wrong module Question: I have a scenario with a Python project that has 2 similar modules (same name and same structure). I make sure that the PYTHONPATH has the right order of imports so that it has the behavior I expect. But the F12 Go To Definition …

Total answers: 1