0
我在Windows上使用ZeroBrane在Linux上遠程調試我的程序。
我的程序從C++調用lua。
但是斷點不能被擊中。
你能幫我嗎?謝謝。ZeroBrane遠程調試
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
感謝您的幫助。 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 \'。 – pomato
您可能需要[檢查此主題](https://www.freelists.org/post/zerobrane/Remote-debugging-IDE-project-path-vs-actual-file-path.5)類似的情況,並且可以提供關於調試器如何處理跨平臺路徑映射的更詳細的解釋。您可能希望向我發送一封電子郵件到項目網站上的地址,因爲通過這種方式獲取更多細節可能會更容易。 –