Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 97371

VS Code: ModuleNotFoundError when using debug

$
0
0

I develop a Django project I ma newbie in Django and VS Code so I "debug" using print() and console.log() which is not efficient... so I really need to be able to debug my code and follow variable value during execution but when I try to run debug

I read the VS Code doc about django

so I have set the launch.json like that:

{
    // 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 : Fichier actuel",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal"
        }
        {
            "name": "Python: Django",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/manage.py",
            "console": "integratedTerminal",
            "args": [
                "runserver",
                "--noreload"
            ],
            "django": true
        },
    ]
}

I select Python: Django in the debug configuration list and run my project and have ModuleNotFoundError: No module named 'simple_history' and other...

I don't understand because my project works so tierce app are correctly installed in my env

It wonder if it could be link to another problem I have since I start using python/VS Code and was not able to fix (I already post on this problem: python can't load on VS Code):

The environment variable 'Path' seems to have some paths containing the '"' character. The existence of such a character is known to have caused the Python extension to not load. If the extension fails to load please modify your paths to remove this '"' character.

Someone can help me making debug operational?

thanks !


Viewing all articles
Browse latest Browse all 97371

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>