.NET MAUI – 连接 Windows 平板并将其用作 Windows 平台的调试设备

huangapple go评论49阅读模式
英文:

.NET MAUI - Connecting Windows Tablet and Use it as a debugging device for windows platform

问题

I need some help.

如果外部的 Android 设备可以配置为 Android 平台的调试设备,那么 Windows 平台呢?

如何将我的运行 Windows 10 的平板电脑设置为用于调试的外部设备?

特别是在测试 SwipeView 时,它不支持鼠标滑动,所以我需要在我的 Windows 平板设备上测试它。

文档中没有提到这一点。

英文:

I need some help.

If an external android device can be configured as debugging for android platform, how about windows platform?

How do I setup my tablet running windows 10 as an external device for debugging?

Specially testing out SwipeView, it does not support mouse swipes, so I need to test it out on my windows tablet device.

There is no mentioning of this in the documentations.

答案1

得分: 1

Windows没有直接等价于Android的USB调试模式。然而,如果你想要从另一个设备(如PC)调试你的Windows 10平板电脑,你可以使用远程调试。以下是设置方法:

  • 确保你的Windows 10平板电脑和调试设备(PC)连接到同一个网络。

  • 在你的Windows 10平板电脑上,打开“设置”应用程序,然后导航到“更新与安全”。

  • 进入“开发人员”部分。如果你看不到这个部分,这意味着你需要在你的平板电脑上启用开发者模式。你可以通过前往“设置 > 更新与安全 > 开发人员”并选择“开发人员模式”选项来做到这一点。

  • 一旦进入“开发人员”部分,启用“设备发现”选项。这允许其他设备在调试目的下发现你的平板电脑。

  • 在你的PC上,打开一个网络浏览器,并从官方Microsoft网站下载Visual Studio的远程工具。在你的PC上安装这些工具。

在你的PC上启动远程调试器。

  • 在你的Windows 10平板电脑上,打开“设置”应用程序,然后导航到“系统 > 关于”。

  • 查找“设备名称”字段,并记录下你的平板电脑的名称。

  • 在你的PC上,在远程调试器窗口中,转到“调试 > 选项”。

  • 在“限定符”字段中输入你的Windows 10平板电脑的设备名称。

  • 点击“确定”按钮以保存设置。

在你的PC上,转到“调试 > 开始调试”或按下F5开始调试会话。

远程调试器将在网络上搜索你的Windows 10平板电脑并建立连接。

一旦连接建立,你可以使用Visual Studio或任何其他调试工具从你的PC上调试你的Windows 10平板电脑。

注意:远程调试要求两台设备在同一个网络上,并且可能与直接的USB调试相比存在一些限制。重要的是要查阅Microsoft提供的有关Windows 10平板电脑远程调试及其能力的具体细节的文档和资源。

英文:

Windows does not have a direct equivalent to Android's USB debugging mode. However, if you want to debug your Windows 10 tablet from another device, such as a PC, you can use Remote Debugging. Here's how you can set it up:

  • Make sure both your Windows 10 tablet and the debugging device (PC) are connected to the same network.

  • On your Windows 10 tablet, open the Settings app and navigate to "Update & Security."

  • Go to the "For developers" section. If you don't see this section, it means you need to enable developer mode on your tablet. You can do this by going to "Settings > Update & Security > For developers" and selecting the "Developer mode" option.

  • Once in the "For developers" section, enable the "Device discovery" option. This allows your tablet to be discovered by other devices for debugging purposes.

  • On your PC, open a web browser and download the Remote Tools for Visual Studio from the official Microsoft website. Install the tools on your PC.

Launch the Remote Debugger on your PC.

  • On your Windows 10 tablet, open the "Settings" app and navigate to "System > About."

  • Look for the "Device name" field and note down the name of your tablet.

  • On your PC, in the Remote Debugger window, go to "Debug > Options."

  • In the "Qualifier" field, enter the device name of your Windows 10 tablet.

  • Click the "OK" button to save the settings.

On your PC, go to "Debug > Start Debugging" or press F5 to start the debugging session.

The Remote Debugger will search for your Windows 10 tablet on the network and establish a connection.

Once the connection is established, you can debug your Windows 10 tablet from your PC using Visual Studio or any other debugging tools.

Note: Remote Debugging requires both devices to be on the same network and may have some limitations compared to direct USB debugging. It's important to consult the documentation and resources provided by Microsoft for specific details on Remote Debugging and its capabilities for Windows 10 tablets.

huangapple
  • 本文由 发表于 2023年5月15日 10:46:35
  • 转载请务必保留本文链接:https://go.coder-hub.com/76250589.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定