My test files have some explicit relative import
, when i directly run debug, it will raise exception(because the exists of relative import),
so i want to use -m
argument when using debug mode in vscode.
I want to dubug multiple file in project_test
with -m argument(this will allow me to use relative imoprt)
I have tried to modify the launch.json file, but it seems only allow me to specify a fixed module name, how can i do this?
project_test
├── log_test.py
├── user_test.py
├── other_test.py
the last two lines are my attempts.
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Module",
"type": "python",
"request": "launch",
# "module": "project_test.log_test" # this works correctly
"module": "project_test.${file}" # this will raise exception
}
]
}