PDT、XDebug 和德鲁帕尔

发布于 2024-12-21 15:55:21 字数 208 浏览 3 评论 0原文

我正在使用 Drupal、XDebug 和太平洋夏令时。

我需要知道是否需要构建、索引和很多东西来调试一个简单的文件?

举例来说,我正在开发一个包含 3 个文件的 Drupal 模块。我是否需要编译、构建、索引所有 Drupal...只是为了能够在一个文件中插入断点?

另外,如果能解释一下为什么是或为什么不是,那就更好了。

谢谢! :)

I'm using Drupal, XDebug & PDT.

I need to know if I need to build, index, and lots of stuff just to debug a simple file?

Lets' say for example that I'm working on a Drupal module, with 3 files. Do I need to compile, build, index all Drupal... just to be able to insert a breakpoint in one file?

Also, if you could explain why yes or why not, will be better.

Thanks! :)

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

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

发布评论

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

评论(1

飘逸的'云 2024-12-28 15:55:21

简而言之,是的。 Drupal 会针对向您的网络服务器发出的每个页面请求进行引导。您的脚本是在 Drupal 风格的环境中运行的,这就是为什么它可以访问 Drupal DB、Form Api、Fields Api、模块挂钩等。

如果您只想测试脚本的逻辑并且它不依赖于像上面提到的 drupal 元素,您当然可以将其作为 eclipse 中的简单脚本进行调试。也就是说,一开始就不应该有大量的调试 drupal 本身的开销。

祝您的调试之旅好运。一旦你安装并运行它,它会让你的工作效率大大提高,我保证这是值得的。

In short yes. Drupal is bootstrapped for every page request that is made to your webserver. It is within that drupal flavored environment that your script runs, which is why it has access to the Drupal DB, Form Api, Fields Api, module hooks, etc.

If you just want to test the logic of your script and it doesnt rely on drupal elements like the mentioned above you can certainly debug it as a simple script in eclipse instead. That said there shouldnt be a ton of overhead debugging drupal itself in the first place.

Good luck on your debugging adventure. Once you get it up and running it makes you MUCH more productive and i promise its worth it.

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