You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
// Use IntelliSense to learn about possible attributes.// Hover to view descriptions of existing attributes.// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: Django",
"type": "debugpy",
"request": "launch",
"args": ["runserver", "0.0.0.0:8000"],
"django": true,
"autoStartBrowser": true,
"program": "${workspaceFolder}/src/manage.py"
}
]
}
cd src && python manage.py test works well in the VS code terminal.
Since I wasn't sure that the problem wasn't due to the fact that I had a src subdirectory in my project, I redid the test with a new Django project, and I have the same issue.
Extension version: 2024.18.0
VS Code version: Code 1.95.2 (Universal) (e8653663e8840adaf45af01eab5c627a5af81807, 2024-11-07T11:07:22.054Z)
OS version: Darwin arm64 23.5.0
Modes:
Python version (& distribution if applicable, e.g. Anaconda): 3.12.4
Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
Value of the python.languageServer setting: Default
Hi! From this MANAGE_PY_PATH is set, running Django discovery with path to manage.py as: $/Users/me/workspace/company/my-project/src it looks like you set the MANAGE_PY_PATH to a folder? If you could get it to point at your manage.py path for the django project you want to run then that should help.
Indeed, the issue was that the MANAGE_PY_PATH was set to a folder, instead of pointing directly to the manage.py file of the Django project I wanted to run.
Additionally, I had to add the following parameter to make it work in a subfolder:
"python.testing.cwd": "${workspaceFolder}/src"
Type: Bug
Hello team vscode-python, @eleanorjboyd ,
I finally had some time to try the new Django testing in VSCode. Unfortunately, I couldn't get it to work.
Here the log output:
My settings.json:
My launch.json:
cd src && python manage.py test works well in the VS code terminal.
Since I wasn't sure that the problem wasn't due to the fact that I had a src subdirectory in my project, I redid the test with a new Django project, and I have the same issue.
Extension version: 2024.18.0
VS Code version: Code 1.95.2 (Universal) (e8653663e8840adaf45af01eab5c627a5af81807, 2024-11-07T11:07:22.054Z)
OS version: Darwin arm64 23.5.0
Modes:
python.languageServer
setting: DefaultUser Settings
Installed Extensions
System Info
canvas_oop_rasterization: enabled_on
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_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: