简体   繁体   English

如何使用 Pycharm 调试 Sconstruct 脚本?

[英]How to debug Sconstruct script with Pycharm?

I want to setup Pycharm so I can use it to dive into my Sconstruct scrip, and also into python scripts used by SConstruct.我想设置 Pycharm 以便我可以使用它来深入了解我的 Sconstruct 脚本,以及 SConstruct 使用的 python 脚本。 Is there any way to setup Pycharm for that purpose?有没有办法为此目的设置 Pycharm ?

If there is a bit detailed explanation hot to accomplish that would be appreciated.如果有一些详细的解释热来完成,将不胜感激。

Thanks,谢谢,

Milos米洛斯

There's no fully satisfactory way: that would require PyCharm knowledge of the SCons API, which is a requested feature (but not requested enough to trigger any action yet, I've heard it requires far more votes than this):没有完全令人满意的方法:这需要 PyCharm 了解 SCons API,这是一个请求的功能(但还不足以触发任何操作,我听说它需要比这更多的投票):

https://youtrack.jetbrains.com/issue/PY-10591 https://youtrack.jetbrains.com/issue/PY-10591

You can make things better by teaching PyCharm that SConstruct and SConscript are Python files, or by naming your script files with a.py suffix (SCons will automatically recognize several synonyms for SConstruct, including SConstruct.py).您可以通过教导 PyCharm SConstruct 和 SConscript 是 Python 文件,或者通过使用 a.py 后缀命名您的脚本文件(SCons 将自动识别 SConstruct 的几个同义词,包括 SConstruct.py)来使事情变得更好。 At least then normal Python stuff will work, but it won't know about the SCons functions - maybe if you include a local-install copy of scons in your project tree, I've never explicitly tried that.至少正常的 Python 东西会起作用,但它不会知道 SCons 功能 - 也许如果您在项目树中包含 scons 的本地安装副本,我从未明确尝试过。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM