【问题标题】:Debugging suspended at 'mobdebug.start():1' (couldn't activate the file)在 'mobdebug.start():1' 处暂停调试(无法激活文件)
【发布时间】:2018-01-20 12:38:08
【问题描述】:

我正在尝试使用 ZeroBrane 的远程调试来调试我的应用程序。

我不希望用户在他们的脚本中添加任何额外的代码。所以当用户点击调试按钮时,在C端,我首先设置路径并调用mobdebug库,然后我尝试执行用户代码:

luaL_dostring(L, "package.path = package.path .. ';./scripts/lualibs/mobdebug/?.lua;./scripts/lualibs/?.lua'");
luaL_dostring(L, "package.cpath = package.cpath .. ';./scripts/bin/clibs/?.dll'");
luaL_dostring(L, "mobdebug = require('mobdebug').start()");

luaL_dofile(L, FileName);

它适用于官方 lua 5.1 解释器。调试器在源文件的第 1 行停止。但是如果我切换到 luajit,zerobrane 会提示“调试在 'mobdebug.start():1' 处暂停(无法激活文件)。”。然后我点击“step over”,可以激活脚本文件,调试器停在第1行。

在使用luajit时有什么办法可以跳过错误信息直接激活源文件?

【问题讨论】:

    标签: zerobrane


    【解决方案1】:

    您可能希望将debugger.runonstart = true 设置为继续执行而不在第一行停止 (documentation),但您需要使用断点或Project | Break 在调试开始时暂停执行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-01-30
      • 1970-01-01
      • 2011-12-20
      相关资源
      最近更新 更多