用于调试 scons 的 IDE

发布于 2024-12-15 07:26:53 字数 79 浏览 3 评论 0原文

我有一个使用 scons 和 swig 的项目。我可以使用哪个 IDE 来调试代码?我想设置断点并使用“跳过”,“继续”,....同时观察变量。

I have a project which uses scons and swig. Which IDE I can use for debugging the code? I want to set breakpoints and use "step over", "continue", .... while watching variable.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

单挑你×的.吻 2024-12-22 07:26:53

PyDev(Eclipse 插件)过去对我来说效果很好。实际上,您运行来执行构建的 scons 命令是一个 Python 脚本——您可以在 IDE 中将其替换为类似的脚本,然后启动它进行调试。

话虽如此——
实际上,我发现在使用基于 SCons 的构建系统时,调试方法不太有用。原因是 SCons 使用声明式方法;你的 SConstruct 定义了你的构建的“内容”,当使用调试器进行单步调试时,大多数时候你只是看到这种“内部 DSL”的解析评估是如何的用Python实现(这当然是一种教育经验,但对解决我的构建问题没有帮助)。

因此,通常我只是通过添加一些打印语句来在评估构建脚本时查看当前构建环境中的这个和那个变量来解决我的问题。 SCons 的联机帮助页包含有关您可以在该环境对象中以及添加目标时定义的依赖项节点中访问的各种变量的大量文档。

PyDev (Eclipse plugin) worked well for me in the past. Actually, the scons command you run to perform your build is a Python script -- you can replace it by a similar script within your IDE and launch that for debugging.

Having said that --
actually I found the debugging approach not so helpful when working with our SCons based build system. The reason is that SCons uses an declarative approach; your SConstruct defines the "what" of your build, and when stepping with the debugger, mostly you just see how the parsing and evaluation of that kind of "internal DSL" is implemented in Python (which is surely an educational experience, but not helpful for solving problems with my build).

Thus, usually I solve my problems just with adding some print statements to look into this and that variable in the current construction environment while the build script is evaluated. The manpage of SCons has extensive documentation about the various variables you can access in that environment object and in the dependency nodes defined when you add targets.

撩心不撩汉 2024-12-22 07:26:53

任何 Python 调试器都应该没问题。如果您想要一个完整的 IDE,PyCharm 是一个不错的起点。

Any Python debugger should be fine. PyCharm is a good place to start if you want a full IDE.

真心难拥有 2024-12-22 07:26:53

PyTools 和 Visual Studio 2010 对我来说效果很好,但当我无法使用 VS+PyTools 时,我会选择 PyCharm CE/Pro。所有 VS 调试工具(针对您正在运行的版本)都可用于调试 Python(比 PyCharm 的好一点)。 (Enterprise 中有额外的性能调试工具。)

除了 VS2010 之外,PyTools 还支持 VS2012 和 VS2013。

注意:插件/扩展/附加组件似乎仅在 VS Pro 及更高版本中可用,在 Express 中不可用。

顺便说一句,如果您 (或您的其他人团队)想要调试 Django,PyCharm Pro 绝对是最好的选择。

PyTools and Visual Studio 2010 work great for me, though I settle for PyCharm CE/Pro when I can't use VS+PyTools. All of the VS debugging facilities (for the version that you are running) will be available for debugging Python (which are a bit better than PyCharm's). (There are extra performance debugging facilities in Enterprise.)

PyTools also supports VS2012 and VS2013, in addition to VS2010.

NOTE: Plugins/Extensions/Addons appear to only be available in VS Pro and higher, not Express.

As an aside, if you (or others on your team) want to also debug Django, PyCharm Pro is definitely the best for that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文