vs代码' python Debugger do do do do do to odoo 10
我使用VS Code Extension Python版本2.2X,Python解释器2.7倍,并使用最新版本的Odoo 10。我正在与Ubuntu 18.4 Lts一起使用WSL。
我无法调试我公司创建的自定义模块。我已经在参数中指定了模块的路径,并且确实运行,但它并没有在我指定的断点。
这是我的启动
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "/home/ihsansfd/odoo/odoo-bin",
"python": "/usr/bin/python",
"args": [
"--db_port=5434",
"--addons-path=/mnt/d/kuliah/odoo/repo/MUK/base,/mnt/d/kuliah/odoo/repo/MUK/core,/mnt/d/kuliah/odoo/repo/MUK/modifier",
],
"console": "integratedTerminal",
"justMyCode": true
},
。调试。
我真的确定它应该碰到断点,因为我已经在那里设置了一个打印语句并打印了!
任何帮助将不胜感激。如果您需要进一步的细节,请询问。
I use VS Code extension Python version 2.2x, Python interpreter version 2.7x, and use Odoo 10 of the latest version. I'm using WSL with Ubuntu 18.4 LTS.
I cannot debug the custom modules my company creates. I've specified the module's path in the argument, and it does run but it's not breaking at the breakpoints I specified.
Here's my launch.json:
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "/home/ihsansfd/odoo/odoo-bin",
"python": "/usr/bin/python",
"args": [
"--db_port=5434",
"--addons-path=/mnt/d/kuliah/odoo/repo/MUK/base,/mnt/d/kuliah/odoo/repo/MUK/core,/mnt/d/kuliah/odoo/repo/MUK/modifier",
],
"console": "integratedTerminal",
"justMyCode": true
},
Aside from request launch
, I also tried attach
and using a pip library debugpy
for that but it's still only running without debugging.
I am really sure that it should hit the breakpoint because I've set a print statement there and it printed!
Any help would be appreciated. If you need any further detail please do ask.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尽管您提到您已经尝试使用
附加
debugpy
,但我正在共享我的配置,因为actact
和debugpy
是我每天都没有任何问题的方法。这是我用来通过
debugpy
运行odoo
的shell命令。将
Python3
更改为python
用于您的用例。还将0.0.0.0:5678
更改为您需要的任何东西。我喜欢在Docker容器中运行ODOO,这也是我更喜欢仅附加到该过程而不是通过VS代码启动它的原因。我在
/debug/debugpy
使用此命令中安装了debugpy
debugpy debugpy debugpy这是我在我的
aumination.json.json
中使用的启动配置:希望这会有所帮助!
Although you mentioned you've tried using
attach
withdebugpy
, I'm sharing my configuration sinceattach
anddebugpy
is what I use every day without any issues.Here is the shell command I use to run
odoo
viadebugpy
.Change
python3
to justpython
for your use case. Also change0.0.0.0:5678
to whatever you need as well. I like to run Odoo inside a Docker container, and that's also the reason why I prefer to simply attach to the process rather than launching it right from VS Code.I installed
debugpy
to/debug/debugpy
using this command:Here is the launch configuration I use in my
launch.json
:Hopefully this helps!