ARTICLE DETAIL

建站实战干货

来自一线的建站与推广经验沉淀,每一条都经过真实交付验证。

vscode导入其他文件夹下报错No Module

2026/10/5 18:17:23 拓冰建站 浏览量
vscode导入其他文件夹下报错No Module

在项目中创建haunch.json如下

{

    // 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: Current File",

            "type": "debugpy",

            "request": "launch",

            "program": "${file}",

            "cwd": "${fileDirname}",

            "env": {"PYTHONPATH":"${workspaceRoot}"},

            "envFile": "${workspaceRoot}/.env",

        }

    ]

}