Extendscript Toolkit 没有在断点处停止,为什么?

发布于 2024-09-28 20:50:20 字数 152 浏览 1 评论 0原文

我正在使用 Extendscript Toolkit 编写 Illustrator CS5 脚本。

我在代码中设置了几个断点,它们在行号旁边显示为红点。但是当我运行脚本时,它一直执行到最后而不停止,并且断点点变暗。

我在这里缺少什么?

谢谢!

I am scripting Illustrator CS5 with the Extendscript Toolkit.

I set several breakpoints in my code, they show up as red dots next to the line number. But when I run the script, it executes all the way to the end without stopping and the breakpoint dots turn dark.

What am I missing here?

Thanks!

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

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

发布评论

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

评论(2

再浓的妆也掩不了殇 2024-10-05 20:50:20

检查以确保 $.level 未在代码或应用的启动脚本中的某个位置设置。如果$.level 设置为01,则断点被禁用。您还可以尝试在代码开头显式设置 $.level=2,以确保断点已打开。

Check to make sure $.level isn't set somewhere, either in your code or the app's startup script. If $.level is set to 0 or 1, breakpoints are disabled. You might also try explictly setting $.level=2 at the start of your code, to ensure breakpoints are turned on.

哑剧 2024-10-05 20:50:20

这是 ESTK(Extendscript Toolkit)中的一个常见错误,我相信这是一个错误 - 断点不应通过启动脚本来禁用。
最有可能的是按 F11(步入)也会使断点变成深红色(禁用)。但在这种状态下(单步执行代码),您可以再次启用断点,当您让脚本运行(F5)时,断点将会被命中。
(快捷方式适用于 Windows 版本。)

另一件事是首先从 InDesign 中的脚本面板启动脚本(运行一次),然后从 ESTK 启动它。如果您使用 targetengine 指令来设置特定的引擎名称,这甚至可能是必要的。

This is a common error in the ESTK (Extendscript Toolkit), I believe it's a bug - breakpoints should not get disabled by starting the script.
Most likely pressing F11 (step into) will also make the breakpoints turn into a darker red colour (disabled). But in this state (stepping through the code) you can enable the breakpoints again and they will get hit when you let the script run on (F5).
(Shortcuts are for the Windows version.)

Another thing to try is to first start the script from the scripts panel in InDesign (run it once), and then start it from the ESTK. If you use the targetengine directive to set a specific engine name, this might even be necessary.

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