主持远程调试会话Host a Remote Debugging Session

适用于:Windows 8.1、Windows 8Applies To: Windows 8.1, Windows 8

通过相应的权限,你可以使用 Windows® 远程调试客户端主持远程调试会话,并邀请其他人和你一起参与会话。With the appropriate permissions, you can host a remote debugging session using the Windows® Remote Debugging client, and invite other people to take part in the session with you. 在调试过程中,这些受邀的用户也称为“客户端”。These invited users are also known as "clients" during the debugging process.

只有主持人可以查看和运行调试命令。Only the host can review and run debug commands.

开始之前Before you begin

为了使用 Windows Remote Debugging 客户端主持远程调试会话,你需要:In order to host a remote debugging session using the Windows Remote Debugging client, you need:

  • 主持权限。Hosting permissions.

  • 安装在本地计算机上的 Kernel Debugger (KD)。The Kernel Debugger (KD) installed on your local computer.

有关如何下载 Windows 远程调试程序以及获取主持会话权限和 KD 的详细信息,请参阅准备远程调试For more information about how to download the Windows Remote Debugger, get host session permissions and the KD, see Prepare for Remote Debugging.

主持远程调试会话To host a remote debugging session

  1. 使用你用来登录到仪表板的 Microsoft 帐户登录到 Windows 远程调试客户端。Sign in to the Windows Remote Debugging client with the Microsoft account that you use to sign in to the dashboard.

  2. 打开“主持会话”*选项卡。Open the *Host Sessions tab.

  3. 在“操作”*菜单上,单击“主持会话”On the **Actions* menu, click Host Session.

  4. 在“主持会话”*对话框中,完成以下操作:In the *Host Session dialog box, complete the following:

    文本框Text box 输入Enter

    调试程序位置Debugger location

    指向计算机上 kd.exe 文件的位置。Point to the location of the kd.exe file on your machine.

    参数Arguments

    输入参数命令以启动 KD 进程,例如以下进程之一:Enter an argument command to start a KD process, such as one of the following:

    • 连接到在 TCP 端口上启动的 KD 服务器:To connect to a KD server started on a TCP port:

      –remote tcp:server=<ServerMachineName>,port=<ServerPortNumber>

    • 连接到通过管道启动的 KD 服务器:To connect to a KD server started with a pipe:

      –remote npipe:server=<ServerMachineName>,pipe=<PipeName>

    注意Note

    尽管你可以直接从 Windows Remote Debugging 客户端运行 KD 工具,但是强烈建议从 Windows Remote Debugging 客户端启动 KD 进程,以访问远程计算机上打开的 KD 会话。Although you can run the KD tool directly from the Windows Remote Debugging client, we strongly recommend that you start a KD process from the Windows Remote Debugging client to access an open KD session on a remote computer.

    会话名称Session name

    为你的会话创建你的客户端容易识别的名称。Create a name for your session that can be easily identified by your clients.

    会话描述Session description

    如果你愿意,你可以输入会话描述及可帮助你进行调试的任何备注。If you want, you can enter a description of the session and any notes that can help you with debugging.

  5. 若要打开可输入和运行调试命令的新“命令”*窗口,请单击“确定”To open a new **Command* window where you can enter and run debug commands, click OK.

    结果将提供给连接到此会话的任何客户端。The results are available to any client who connects to this session.

邀请客户端加入远程调试会话Invite a client to a remote debugging session

作为主持人,你在单个会话中最多可以邀请十个客户端。As host, you can invite up to ten clients to a single session.

在你邀请客户端加入会话之前:Before you can invite a client to a session:

  • 你必须是该会话的主持人。You must be the host of the session.

  • 客户端必须有权加入会话。The client must have permission to join sessions.

  • 你必须知道客户端的仪表板电子邮件地址。You must know the dashboard email address for the client.

邀请客户端加入会话的步骤To invite a client to a session

  1. 在 Windows 远程调试客户端中的“主持会话”*选项卡上,选择某个会话。In the Windows Remote Debugging client, on the *Host Sessions tab, select a session.

  2. 在“操作”*菜单上,单击“邀请客户”On the **Actions* menu, click Invite Client.

  3. 在“邀请客户”*对话框的“Winqual 电子邮件地址”文本框中,输入你要邀请的客户的仪表板电子邮件地址,然后单击“查找”In the *Invite Client dialog box, in the Winqual Email Address text box, enter the dashboard email address for the client you want to invite, and then click Find.

  4. 如果客户端符合加入会话的条件,则将客户端的详细信息添加到对话框中。If the client is eligible to join the session, the client's details are added to the dialog box. 如果客户不符合条件,则指引客户参考准备远程调试If the client is not eligible, direct the client to Prepare for Remote Debugging.

    如果需要,继续添加更多客户端。Continue to add more clients if you want.

  5. 最多选择希望邀请的十个客户,然后单击“确定”*Select up to ten clients that you want to invite, and then click *OK.

此时将向每个客户端和主持人发送一封包含有关会话详细信息的电子邮件。An email message with details about the session is sent to each client and to the host.

作为主持人,你也可以邀请你自己加入会话。As a host, you can also invite yourself to a session. 这样,你可以从远程位置加入会话并查看调试历史。This allows you to join the session from a remote location and view the debugging history.

关闭或终止会话Close or terminate a session

作为主持人,你可以临时关闭会话,或永久终止会话。As a host, you can either close a session temporarily, or terminate it permanently.

在终止会话后,你将不能重新激活该会话。You can't reactivate a session after it has been terminated. 可以临时关闭会话,然后由客户端或主持人重新打开。A session can be closed temporarily, and then re-opened by either a client or a host.

你可能会因为想要移动到不同的计算机,或者希望稍后再回到调试会话,所以需要临时关闭会话。You may want to close a session temporarily because you want to move to a different computer, or you want to return to the debugging session at a later time. 该会话将继续处于活动状态。The session will continue to be active.

如果不再需要某个会话,可以永久终止该会话。When you no longer need a session, you can terminate it permanently.

关闭会话的步骤To close a session

  • 关闭“命令”*窗口。Close the *Command window.

终止会话的步骤To terminate a session

  1. 当你从 Windows 远程调试客户端使用 KD 进程访问远程计算机上打开的 KD 会话时,请在 Windows 远程调试客户端中的“主持会话”*选项卡上,选择某个会话。When you are using a KD process from the Windows Remote Debugging client to access an open KD session on a remote computer, in the Windows Remote Debugging client, on the *Host Sessions tab, select a session.

  2. 在“操作”*菜单上,单击“终止会话”On the **Actions* menu, click Terminate Session.

这样将终止 Windows Remote Debugging 客户端中的会话,但是远程计算机上的 KD 会话将保持活动状态。This terminates the session in the Windows Remote Debugging client, but the KD session on the remote machine remains active. 这样将允许你重新连接到会话(如有必要)。This allows you to reconnect to the session if necessary.

你/客户还可以使用 Windows 任务管理器或者在“命令”*窗口中输入以下命令之一来通过 KD 终止会话。You or a client can also terminate a session through KD either by using Windows Task Manager or by entering one of the following commands in the *Command window:

  • qqqq

  • qqdqqd

  • .detach.detach

  • ^B^B

  • .remote_exit.remote_exit

不再活动的会话将被标记为已终止,并显示在主持会话选项卡上。Sessions that are no longer active are marked as terminated and displayed on the Host Session tab. 在终止后,客户端最长只能看到他们受邀的那些会话七天。Clients can see only those sessions to which they were invited for up to seven days after termination.

注意Caution
如果你选择直接从 Windows Remote Debugging 客户端和本地 KD 连接到目标计算机,并且你或客户端使用这些方法之一终止会话,则所有其他客户端将断开连接,并且你无法还原会话。If you choose to connect directly from your Windows Remote Debugging client and local KD to the target computer, and you or a client use one of these methods to terminate a session, all the other clients will be disconnected and you cannot restore the session. 为避免出现这种情况,强烈建议你连接到另一台计算机上打开的 KD 会话。To avoid this, we strongly recommend that you connect instead to an open KD session on another computer.

相关主题Related topics

准备远程调试Prepare for Remote Debugging

参与远程调试会话Take Part in a Remote Debugging Session

远程调试客户端的已知问题Known Issues with the Remote Debugging Client

向 Microsoft 发送有关该主题的评论Send comments about this topic to Microsoft