用于 Windows 的 Lua
我正在尝试使用“lua for windows” - SciTE 简单的例子,例如 Print("hello")
我按 Alt + R (根据教程说明),每次这样做我都会得到: “无法调试程序!” 有人遇到过这个问题吗?
I'm trying to use "lua for windows" - SciTE
Simply example such as Print("hello")
I hit Alt + R (per tutorial instructions), everytime I do this I get:
"Unable to debug program!"
Anyone had this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它适用于 XP 32 位系统。
我启动了 SciTE,打开了一个新文档,在第 1 行中输入
print "hello, world."
。然后 Alt-R 提示我在继续之前保存文件。将其保存为 foo.lua 后,调试器启动,第 1 行是当前行。按预期单击调试控制台上打印的“Step”按钮(或 Alt+C),调试器退出,因为没有更多程序。我在 Lua for Windows v5.1.4.23 中执行此操作,该版本不再是最新版本。
我假设您已经检查了所有常见的“是否已插入”问题...您正常安装了它,您已经注销并再次登录或在安装后的某个时间重新启动,
lua -v
请尝试手动运行该文件,将其保存到
hello.lua
并在命令提示符下输入lua hello.lua
。It works for me on XP 32-bit.
I launched SciTE, opened a new document, typed
print "hello, world."
into line 1. Alt-R then prompted me to save the file before continuing. After saving it asfoo.lua
, the debugger started and line 1 was the current line. Clicking the Step button (or Alt+C) printed on the debug console as expected, and the debugger exited because there was no more program.I did this in Lua for Windows v5.1.4.23, which is no longer the most current version.
I assume you've already checked all of the usual "is it plugged in" questions... you installed it normally, you have logged off and on again or rebooted sometime since the install,
lua -v
says something sensible, etc.Do try running the file manually by saving it to
hello.lua
and sayinglua hello.lua
to a command prompt.解决方案是手动将扩展名添加到文件中,因为保存文件时无法选择任何类型的扩展名(某种错误),这解决了我的问题。
foo.lua
the solution is to add the extension to the file manually because you cannot choose any type of extensions while you saving the file (kind of bug), this solved my problem.
foo.lua