我正在使用poetry构建一个包,并且已经创建了我的包名和venv。
From the command line i can run poetry run package-name --flags
and it will run my cli.py and references to appropriate imports etc.
My cli.py has from package-name import module
. Everything works.
然而在VS代码中,我试图让它从调试器接口运行这个命令,^^在启动和设置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": "python",
"request": "launch",
"program": "${workspaceRoot}/package-name/cli.py",
"args": [
"removeuser",
"--ini",
"../../ini/test.ini"
],
"console": "integratedTerminal"
}
]
}
但这不起作用。你知道什么是正确的配置吗?
先谢了。
1条答案
按热度按时间lawou6xi1#
我觉得你需要这样的东西:
我正在做类似的事情,但还没有找到更好的解决方案