System Enable or Disable Device Discovery in Developer Mode in Windows 11


  • Staff
Device_Discovery_banner.png

This tutorial will show you how to turn on or off Device Discovery for developers in Developer Mode to make your Windows 11 device visible to USB connections and your local network.

SSH services are enabled when you enable Device Discovery on your device. This is used when your device is a remote deployment target for MSIX packaged applications. The names of the services are SSH Server Broker and SSH Server Proxy.

In order to take advantage of the SSH services, you can enable Device Discovery to allow pin pairing. If you intend to run another SSH service, you can set this up on a different port or turn off the Developer Mode SSH services. To turn off the SSH services, turn off Device Discovery.

SSH login is done via the DevToolsUser account, which accepts a password for authentication. This password is the PIN displayed on the device after pressing the Device Discovery Pair button, and it's only valid while the PIN is displayed. A SFTP subsystem is also enabled for manual management of the DevelopmentFiles folder where loose file deployments are installed from Visual Studio.

The existing SSH server used in Windows is not yet protocol compliant. Using an SFTP or SSH client may require special configuration. In particular, the SFTP subsystem runs at version 3 or less, so any connecting client should be configured to expect an old server. The SSH server on older devices uses ssh-dss for public key authentication (which OpenSSH has deprecated). To connect to such devices, the SSH client must be manually configured to accept ssh-dss.

When you enable Device Discovery, you're allowing your device to be visible to other devices on the network through mDNS. This feature also allows you to get the SSH PIN for pairing to the device by pressing the Pair button exposed immediately after Device Discovery is enabled. This PIN prompt must be displayed on the screen in order to complete your first Visual Studio deployment targeting the device.

Pair_device_code.png

You should enable Device Discovery only if you intend to make the device a deployment target. For example, if you use Device Portal to deploy an app to a phone for testing, you need to enable Device Discovery on the phone, but not on your development PC.


References:

You must be signed in as an administrator to enable or disable Device Discovery.

Device Discovery requires Developer Mode to be turned on.



Contents

  • Option One: Turn On or Off Device Discovery in Developer Mode in Settings
  • Option Two: Turn On or Off Device Discovery in Developer Mode using REG file




Option One

Turn On or Off Device Discovery in Developer Mode in Settings


1 Open Settings (Win+I).

2 Click/tap on System on the left side, and click/tap on For developers on the right side. (see screenshot below)


For_Developers_Settings-1b.png

3 Turn On or Off (default) Device Discovery for what you want. (see screenshots below)

Devices_discovery_for_developers-2.png
Devices_discovery_for_developers-1.png

4 You can now close Settings if you like.




Option Two

Turn On or Off Device Discovery in Developer Mode using REG file


1 Do step 2 (on) or step 3 (off) below for what you want.

2 Turn On Device Discovery in Developer Mode

A) Click/tap on the Download button below to download the REG file below, and go to step 4 below.​

Turn_ON_Device_Discovery_in_Developer_Mode.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\debugregsvc\Parameters]
"DebugState"=dword:00000001

3 Turn Off Device Discovery in Developer Mode

This is the default setting.


A) Click/tap on the Download button below to download the file below, and go to step 4 below.​

Turn_OFF_Device_Discovery_in_Developer_Mode.reg


(Contents of REG file for reference)
Code:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\debugregsvc\Parameters]
"DebugState"=dword:00000000

4 Save the .reg file to your desktop.

5 Double click/tap on the downloaded .reg file to merge it.

6 When prompted, click/tap on Run, Yes (UAC), Yes, and OK to approve the merge.

7 If you like, you can now delete the downloaded .reg file.


That's it,
Shawn Brink


 

Attachments

  • Turn_OFF_Device_Discovery_in_Developer_Mode.reg
    646 bytes · Views: 19
  • Turn_ON_Device_Discovery_in_Developer_Mode.reg
    646 bytes · Views: 19
Last edited:
Back
Top Bottom