首先要安裝軟體在想要debug的電腦上.
軟體會放在在debug端,建一個使用者MyName,當然權限越高越好。
執行Remote Debugging Monitor,打開Toos\Option,可以發現Server Name,For example MyName@OtherPC。
會到visual studio,開你的C++ Solution,打開Project\Property\Linker,Output File設為"\\OtherPC\c$\Test.exe"
5:在C++ Solution,打開Project\Property\Debugging 你應該可以看到Debugger to launch的預設值應該是
"Local Windows Debugger",把它改為"Remote Window Debugger"。
5.1:在Remote Command設定為"\\OtherPC\C$\Test\Test.exe"
5.2:在Remote Server Name設定為"MyName@OtherPC"
如果一切順利,你應該可以開始Remote Debugging。
P.S. 如果發生以下訊息"Unable to start debugging",那是因為Debugging Server無回應,請確定OtherPC的Remote Debugging Server是否已經打開.
有時開始Remote Debugging時,Visual Studio會發出一個Dialog Box告訴你無法Remote Debugging,這時請檢查"系統管理工具\本機安全性原則工具\安全性設定\本機原則\安全性選項\網路存取:共用和安全性模式用於本機帳戶"的設定.
如果是"僅適用於來賓-本機使用者以Guest驗證"請改為"傳統-本機使用者以自身身份驗證"。
引用:http://blog.xuite.net/xujy280/twblog/127304235-Remote+Debug(For+Visual+Studio).
沒有留言:
張貼留言