【问题标题】:ZeroBrane remote debuggingZeroBrane 远程调试
【发布时间】:2017-08-17 12:32:48
【问题描述】:

我在 Windows 上使用 ZeroBrane 在 linux 上远程调试我的程序。
我的程序从 C++ 调用 lua。
但是无法命中断点。

ZeroBrane 输出如下:

Debugger server started at AGOC3-706:8172.
[192.168.88.238:47444] Debugger sent (command): basedir D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\
New base directory is D:/WorkSpace/sichuan/branches/v1.0.1-2017-07-12/lua/
[192.168.88.238:47444] Debugger received (file, line, err): nil nil nil
[192.168.88.238:47444] Debugger sent (command): delallb
[192.168.88.238:47444] Debugger received (file, line, err): nil nil nil
[192.168.88.238:47444] Debugger sent (command): setb D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\hall2\hall.lua 1
[192.168.88.238:47444] Debugger received (file, line, err): hall2/hall.lua  1   nil
[192.168.88.238:47444] Debugger sent (command): setb D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\hall2\hall.lua 37
[192.168.88.238:47444] Debugger received (file, line, err): hall2/hall.lua  37  nil
[192.168.88.238:47444] Debugger sent (command): setb D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\hall2\hall.lua 305
[192.168.88.238:47444] Debugger received (file, line, err): hall2/hall.lua  305 nil
[192.168.88.238:47444] Debugger sent (command): setb D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\hall2\hall.lua 831
[192.168.88.238:47444] Debugger received (file, line, err): hall2/hall.lua  831 nil
[192.168.88.238:47444] Debugger sent (command): setb D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\hall2\hall.lua 1718
[192.168.88.238:47444] Debugger received (file, line, err): hall2/hall.lua  1718    nil
[192.168.88.238:47444] Debugger sent (command): setb D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\hall2\hall.lua 3441
[192.168.88.238:47444] Debugger received (file, line, err): hall2/hall.lua  3441    nil
[192.168.88.238:47444] Debugger sent (command): load D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\hall2\hall.lua
[192.168.88.238:47444] Debugger received (file, line, err): lua/hall2/main.lua  2   nil
[192.168.88.238:47444] Debugger sent (command): basedir D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\    lua/
New base directory is D:/WorkSpace/sichuan/branches/v1.0.1-2017-07-12/lua/
[192.168.88.238:47444] Debugger received (file, line, err): nil nil nil
[192.168.88.238:47444] Debugger sent (command): delallb
[192.168.88.238:47444] Debugger received (file, line, err): nil nil nil
[192.168.88.238:47444] Debugger sent (command): setb D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\hall2\hall.lua 1
[192.168.88.238:47444] Debugger received (file, line, err): hall2/hall.lua  1   nil
[192.168.88.238:47444] Debugger sent (command): setb D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\hall2\hall.lua 37
[192.168.88.238:47444] Debugger received (file, line, err): hall2/hall.lua  37  nil
[192.168.88.238:47444] Debugger sent (command): setb D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\hall2\hall.lua 305
[192.168.88.238:47444] Debugger received (file, line, err): hall2/hall.lua  305 nil
[192.168.88.238:47444] Debugger sent (command): setb D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\hall2\hall.lua 831
[192.168.88.238:47444] Debugger received (file, line, err): hall2/hall.lua  831 nil
[192.168.88.238:47444] Debugger sent (command): setb D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\hall2\hall.lua 1718
[192.168.88.238:47444] Debugger received (file, line, err): hall2/hall.lua  1718    nil
[192.168.88.238:47444] Debugger sent (command): setb D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\hall2\hall.lua 3441
[192.168.88.238:47444] Debugger received (file, line, err): hall2/hall.lua  3441    nil
Mapped remote request for 'lua/' to 'D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\'.
Debugging session started in 'D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\'.
[192.168.88.238:47444] Debugger sent (command): run

【问题讨论】:

    标签: lua zerobrane


    【解决方案1】:

    如果没有关于您的设置的更多详细信息(IDE 版本、您远程使用的调试器版本、您在 Linux 上启动调试器的目录),很难说出为什么它可能无法工作,但有一些原因为什么断点可能不会被触发是listed in the FAQ。如果您没有使用最新版本的 IDE (v1.60),我会尝试使用它,并确保您远程使用的调试器 (mobdebug.lua) 也来自该版本。

    【讨论】:

    • 感谢您的帮助。 ZeroBrane 版本是 1.60; mobdebug 是 0.648,linux 上的 zerobrane 也是官方网站的最新版本。我比较 windows 和 linux 的 mobdebug.lua 是一样的。是否有一些影响,因为我的程序是多线程的,我只是将 require('mobdebug').start("192.168.88.180") 添加到其中之一。我将绝对路径添加到函数“luaL_dofile”,但它仍然不起作用。登录为:将 '/home/pomato/scb/lua/' 的远程请求映射到 'D:\WorkSpace\sichuan\branches\v1.0.1-2017-07-12\lua\'。
    • 您可能希望check on this thread 涵盖类似的情况,并可能提供有关调试器如何处理跨平台路径映射的更详细说明。您可能需要向项目网站上的地址发送电子邮件,因为这样可能更容易获得更多详细信息。
    猜你喜欢
    • 2019-05-11
    • 1970-01-01
    • 2021-03-21
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多