{"id":19,"date":"2006-07-19T07:00:27","date_gmt":"2006-07-19T12:00:27","guid":{"rendered":"http:\/\/www.nynaeve.net\/?p=19"},"modified":"2019-12-13T17:43:35","modified_gmt":"2019-12-13T22:43:35","slug":"remote-debugging-with-remoteexe","status":"publish","type":"post","link":"http:\/\/www.nynaeve.net\/?p=19","title":{"rendered":"Remote debugging with remote.exe"},"content":{"rendered":"<p>One of the oldest mechanisms for remote Windows debugging is the venerable <em>remote.exe<\/em>, which ships with the DTW package.\u00c2\u00a0 Remote.exe\u00c2\u00a0essentially just pipes console input\/output over a the network, which means that you can only use\u00c2\u00a0it for the console debuggers (cdb, kd).\u00c2\u00a0 This mechanism has the server end of the remote debugging session do all of the &#8220;hard work&#8221;, with the client acting as just a dumb user interface.<\/p>\n<p>To start a remote server, use the following:<\/p>\n<pre>remote.exe \/s \"command-line\" instance-name<\/pre>\n<p>where &#8220;command-line&#8221; is the debugger command line (for instance, &#8220;cdb notepad.exe&#8221;), and instance-name is a unique identifier (you can pick anything) that allows the remote client to select what program to connect to.<\/p>\n<p>To connect to a remote server, you can use this command:<\/p>\n<pre>remote.exe \/c computer-name instance-name<\/pre>\n<p>where computer-name is the name of the computer running the remote server, and instance-name matches the value you passed to remote.exe \/S.\u00c2\u00a0 To quit the remote client, you can send the special string &#8220;@K&#8221; (and hit enter) on its own line, which will terminate the remote session (but will leave the remote server running).\u00c2\u00a0 Likewise, you can enter the &#8220;@K&#8221; command on the server end of the console to quit the server and terminate the redirected process.<\/p>\n<p>That&#8217;s all there is to it.\u00c2\u00a0 You can actually use remote.exe to control console programs other than cdb\/kd remotely, as it doesn&#8217;t really have any\u00c2\u00a0special intelligence\u00c2\u00a0about interacting with the program you are running under remote.exe.<\/p>\n<p>The remote.exe method\u00c2\u00a0is the most lightweight of all of the remote debugging options available to you, but it&#8217;s also the most limited (and it doesn&#8217;t have any concept of security, either).\u00c2\u00a0 You might find it useful in scenarios where you are very limited on bandwidth, but for most cases you are much better off using one of the other remote debugging mechanisms.<\/p>\n<p>Update: <a title=\"Pavel Lebedinsky's comment\" href=\"#comment-58\">Pavel Lebedinsky<\/a> points out that you can set a security descriptor on the remote.exe pipe via &#8220;\/u&#8221; and &#8220;\/ud&#8221; (though this will require that you have either local accounts with the same password as a remote user, or a trust relationship [e.g. domain] with the remote computer).\u00c2\u00a0 This does allow for some form of access control, though it is generally convenient only if both computers are on\u00c2\u00a0the same domain from what I can tell.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the oldest mechanisms for remote Windows debugging is the venerable remote.exe, which ships with the DTW package.\u00c2\u00a0 Remote.exe\u00c2\u00a0essentially just pipes console input\/output over a the network, which means that you can only use\u00c2\u00a0it for the console debuggers (cdb, kd).\u00c2\u00a0 This mechanism has the server end of the remote debugging session do all of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,5],"tags":[],"_links":{"self":[{"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/posts\/19"}],"collection":[{"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=19"}],"version-history":[{"count":1,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/posts\/19\/revisions"}],"predecessor-version":[{"id":692,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=\/wp\/v2\/posts\/19\/revisions\/692"}],"wp:attachment":[{"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.nynaeve.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}