启用设备进行开发Enable your device for development

启用开发人员模式、旁加载应用和使用其他开发人员功能Activate Developer Mode, sideload apps and access other developer features

启用设备进行开发

重要

如果不是在自己的电脑上自行创建应用程序,则无需启用开发人员模式。If you're not creating your own applications on your PC, you don't need to enable Developer Mode. 若要尝试解决计算机上遇到的问题,请查看 Windows 帮助If you're trying to fix an issue with your computer, check out Windows help. 如果是第一次开发,则还需要下载所需的工具来进行设置If you're developing for the first time, you'll also want to get set up by downloading the tools you need.

如果你正在使用计算机进行一般的日常活动,如玩游戏、进行 Web 浏览、收发电子邮件或使用 Office 应用,则不需要激活开发人员模式,并且实际上不应该激活该模式。If you are using your computer for ordinary day-to-day activities such as games, web browsing, email or Office apps, you do not need to activate Developer Mode and in fact, you shouldn't activate it. 此页面上的其余信息对你来说并不重要,你可以放心地重新执行你正在执行的任何操作。The rest of the information on this page won't matter to you, and you can safely get back to whatever it is you were doing. 谢谢拜访!Thanks for stopping by!

但是,如果你是首次在计算机上使用 Visual Studio 编写软件,则需要在开发电脑和用于测试代码的所有设备上启用开发人员模式。However, if you are writing software with Visual Studio on a computer for first time, you will need to enable Developer Mode on both the development PC, and on any devices you'll use to test your code. 如果未启用开发人员模式,则打开 UWP 项目将会打开“面向开发人员”设置页,或导致在 Visual Studio 中出现以下对话框:Opening a UWP project when Developer Mode is not enabled will either open the For developers settings page, or cause this dialog to appear in Visual Studio:

启用在 Visual Studio 中显示的开发人员模式对话框

当看到此对话框时,请单击“开发人员设置”打开“面向开发人员”设置页 。When you see this dialog, click settings for developers to open the For developers settings page.

备注

可以随时转到“面向开发人员”页启用或禁用开发人员模式:只需在任务栏中的 Cortana 搜索框中输入“面向开发人员”。You can go to the For developers page at any time to enable or disable Developer Mode: simply enter "for developers" into the Cortana search box in the taskbar.

访问面向开发人员的设置Accessing settings for Developers

若要启用开发人员模式或使用其他设置:To enable Developer mode, or access other settings:

  1. 从“面向开发人员”设置对话框中,选择需要的访问级别。From the For developers settings dialog, choose the level of access that you need.
  2. 阅读所选设置的免责声明,然后单击“是”以接受更改。Read the disclaimer for the setting you chose, then click Yes to accept the change.

备注

启用开发人员模式需要管理员访问权限。Enabling Developer mode requires administrator access. 如果设备为组织所有,此选项可能已禁用。If your device is owned by an organization, this option might be disabled.

“开发人员模式”功能Developer Mode features

开发人员模式将替换 Windows 8.1 对于开发人员许可证的要求。Developer Mode replaces the Windows 8.1 requirements for a developer license. 除了旁加载外,开发人员模式设置还支持调试和其他部署选项。In addition to sideloading, the Developer Mode setting enables debugging and additional deployment options. 这包括启动 SSH 服务允许部署该设备。This includes starting an SSH service to allow this device to be deployed to. 为了停止运行此服务,必须禁用开发人员模式。In order to stop this service, you have to disable Developer Mode.

在桌面上启用开发人员模式时,会安装功能包,其中包括:When you enable Developer Mode on desktop, a package of features is installed that includes:

  • Windows 设备门户。Windows Device Portal. 仅当“启用设备门户”选项打开时,才会启用设备门户,并为它配置防火墙规则。Device Portal is enabled and firewall rules are configured for it only when the Enable Device Portal option is turned on.
  • 安装允许远程安装应用的 SSH 服务,并为其配置防火墙规则。Installs, and configures firewall rules for SSH services that allow remote installation of apps. 启用“设备发现”会打开 SSH 服务器。Enabling Device Discovery will turn on the SSH server.

有关这些功能的详细信息,或者如果在安装过程中遇到问题,请查看 开发人员模式功能和调试For more information on these features, or if you encounter difficulties in the installation process, check out developer mode features and debugging.

另请参阅See Also