2017-08-17 171 views
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 

回答

0

這很難說爲什麼可以不工作,而無需對設置的詳情您可以遠程使用調試器,目錄你(的IDE版本,版本在Linux上啓動調試器),但是斷點不能被觸發的一些原因是listed in the FAQ。如果您沒有使用最新版本的IDE(v1.60),我會嘗試使用它,並確保您使用遠程調試器(mobdebug.lua)也來自該版本。

+0

感謝您的幫助。 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

+0

您可能需要[檢查此主題](https://www.freelists.org/post/zerobrane/Remote-debugging-IDE-project-path-vs-actual-file-path.5)類似的情況,並且可以提供關於調試器如何處理跨平臺路徑映射的更詳細的解釋。您可能希望向我發送一封電子郵件到項目網站上的地址,因爲通過這種方式獲取更多細節可能會更容易。 –