====== Debug dans VSCode ou VSCodium ====== Doc: [[https://code.visualstudio.com/docs/python/tutorial-flask]] Aller sur la vue **Run and Debug** S'il n'existe pas encore de fichier **launch.json** dans le projet, l'option **create a launch.json file** permet d'en créer un. * Cliquer sur **create a launch.json file** * Sélectionner **Flask** puis **app.py** Le fichier **launch.json** est créé dans le dossier **.vscode** (caché). { // 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: Flask", "type": "python", "request": "launch", "module": "flask", "env": { "FLASK_APP": "app.py", "FLASK_DEBUG": "1" }, "args": [ "run", "--no-debugger", "--no-reload" ], "jinja": true, "justMyCode": true } ] } ^ F5 | Lancer l'exécution en mode debug / Continuer après un arrêt | ^ F9 | Placer/Enlever un point d'arrêt | ^ F10 | Step Over | ^ F11 | Step Into |