Known issue: Cortana background voice command cannot be debugged due to 5 second timeout (Windows 10 Insider Preview SDK and tools, April 2015 release)
Cortana currently dismisses itself as soon as it loses focus. If you switch to Visual Studio when debugging a background voice command, Cortana will dismiss itself, end the connection with your app and kill the app's background task.
You can work around this issue by remotely debugging your app on a different machine. This eliminates the focus problem by allowing Cortana to remain in focus (on the remote machine) while you debug with Visual Studio (on your local machine).
Prerequisites
You have installed Windows 10 and Visual Studio 2015 RC on your main development computer.
You have installed Windows 10 on a separate computer or virtual machine (Visual Studio not required).
Note: Download Windows 10 from
http://windows.microsoft.com/en-us/windows/preview-iso-update-1504
Terminology
Your local computer is your main development box with Visual Studio 2015 RC and your project files.
Your remote computer is a separate machine that will run your app remotely while maintaining a connection with Visual Studio on your local computer.
Step 1: Enable Remote Desktop
Ensure your remote computer can receive Remote Desktop requests:
Sign into your remote machine
Right-click the Start menu and select System
Make a note of the machine name (you will reference it often)
Click the Remote settings link
Select the Allow remote connections to this computer radio button
Save and close
Step 2: Configure your Remote Desktop connection and remote microphone
On your local machine, start Remote Desktop Connection from the Start menu
Click Show Options
On the General tab, type of the name of the remote machine
Navigate to the Local Resources tab
Click the Settings button in the Remote Audio section
Change Remote audio recording to Record from this computer. This enables the remote microphone
Hit OK and navigate back to the General tab
Click Save As and save the Remote Desktop connection to a location on your computer
Connect to the remote machine
Step 3: Install Remote Tools for Visual Studio 2015 RC on the remote machine
Sign into the remote machine
Navigate to
https://www.visualstudio.com/en-us/downloads/visual-studio-2015-downloads-vs.aspx
Expand Additional Tools and look for Remote Tools for Visual Studio 2015 RC
Download and install
Configure the remote debugger as described at
https://msdn.microsoft.com/en-us/library/bt727f1t.aspx. Tip: Scroll down to “Start and configure the remote tools for the first time”
Run Remote Debugger from the start menu and keep the app running
Step 4: Enable developer mode on the remote machine
This step allows you to deploy and test apps to the remote machine. For details and alternate instructions see
https://msdn.microsoft.com/en-us/library/windows/apps/dn706236.aspx.
Remain signed into the remote machine
Run gpedit.msc from the start menu (this is the Local Group Policy editor)
Ignore the two popup error messages that will appear immediately
Use the tree view on the left side to navigate to Local Computer Policy -> Computer Configuration -> Administrative Templates -> Windows Components -> App Package Deployment
Double-click and enable Allow all trusted apps to install
Double-click and enable Allows development of Windows Store applications and installing them directly from an IDE
Step 5: Enable Cortana debugging on the remote machine
This step disables the 5-second timeout when running a background task.
Remain signed into the remote machine
Run Debuggable Package Manager from the start menu
Copy/paste the following line exactly and hit enter: $a=Get-AppxPackage | Where-Object {$_.Name -eq "Microsoft.Cortana"}
Copy/paste the following line exactly and hit enter: Enable-AppxDebug $a
Type exit and hit enter to close the window
Step 6: Confirm you can connect to the remote machine with Visual Studio
Sign into the local machine and start Visual Studio
Click the Debug -> Attach to process menu (a project does not have to be open)
Type the name of the remote machine and hit enter
Provide your credentials (if using a Microsoft account, type your email display name and password, ignoring the domain text)
The connection is successful if you see a list of processes
Tip: If you experience a problem, make sure the Remote Debugger app is running on the remote machine
Step 7: Configure remote debugging in your Visual Studio project
Open your project in Visual Studio on the local machine
Open the project properties (e.g., right-click the project in the solution explorer and select
Properties)
Navigate to the Debug section
Select Remote Machine for the target device
Type the name of the remote machine
Close settings
If necessary, on the Visual Studio toolbar select Remote Machine
If necessary, switch to x86 or x64 depending on the remote architecture
Run
If prompted, enter your credentials
Switch to the remote machine over Remote Desktop and confirm the app shows up
Sometimes it will not show up during the first run; stop and restart
Set a breakpoint and confirm the debugger on the local machine is triggered
You should now be able to debug Cortana voice commands, including background commands.
Similar Messages
-
When implement a voice command as a background app, calls to modify voice command may not work as expected. For example, calling SetPhraseListAsync on a command set may result in a FileLoadException with the message "The process cannot access
the file because it is being used by another process."There is no workaround for this issue. You may modify voice command definitions from a foreground task or app.
-
Voice command definitions are not removed from Cortana's cache when an app is uninstalled. This may cause conflicts between two apps that share the same voice commands.
This issue should not impact your ability to reinstall and test the same application. However, you must reinstall the OS in order to reset the cache in cases where you are seeing conflicts between different apps.
-
When typing a voice command for an app, e.g., "Find mom on MyApp", Cortana terminates without executing the voice command.
Use the microphone to input voice commands for your app.
-
With the current release of Windows 10 Insider Preview, you cannot enable developer mode using the System Setting Developer Mode control. This feature will be enabled in a future release of Windows 10.
Editing for clarification:
If you try to Developer unlock your Windows 10 system by going to (Search) Settings --> Update & Recovery --> For Developers, you will notice that the "Settings" window closes. You cannot set these Settings through the UI in the current
Build due to the known issue.
VT Mobile Application DevelopmentTo enable your device for development, please follow the links below:
Windows 10 Mobile: Register your phone to
enable developer mode using the existing Windows Phone 8.1 tools
Windows 10 Desktop: Enable your device
for development using the Group Policy Editor
VT Mobile Application Development -
The Visual Studio Tools for Universal Windows App Development are not installed by default. If they are not installed, in the New Project dialog in Visual Studio 2015, you will see only a template “Download Windows Universal Tools”.
For additional known issues with using Visual Studio 2015 RC, see
https://support.microsoft.com/kb/3025133/Additional Installation Known issues:
Visual Studio Tools for Universal Windows Apps Requires Windows 10 Build 10074 or later
https://social.msdn.microsoft.com/Forums/en-US/de06c7c0-4248-4d68-bfcb-4b9a23fae1c0
You cannot install the Visual Studio Tools for Universal Windows Apps on a pre-RC build of Visual Studio 2015
https://social.msdn.microsoft.com/Forums/en-US/25d0b000-3ebb-4032-a786-99caf0390e9b
Emulators for Windows Mobile 10.0.10069 : The installer failed. User cancelled installation. Error code: -2147023294
https://social.msdn.microsoft.com/Forums/en-US/17bc9d5e-2ea7-4149-bb75-23997db8bd25/
Setup warnings for Windows 10 SDK, Emulators for Windows Mobile, and Tools for Windows 10 Universal Apps
https://social.msdn.microsoft.com/Forums/en-US/bfc4fcc0-cb48-4bb0-aab3-5797e31b08e0
Fatal error when installing the Windows emulators: 2147023293
https://social.msdn.microsoft.com/Forums/en-US/5485554c-e7e8-414e-a542-d1f7c0b6291c
Do not install Visual Studio Express 2015 for Windows 10 on a Machine with Visual Studio Community, Professional, or Enterprise
https://social.msdn.microsoft.com/Forums/en-US/94a29b17-baaf-4318-98ff-1cfc90a54bad/
How to enable your Windows 10 device for development
https://social.msdn.microsoft.com/Forums/en-US/6e34c9f0-5e3a-4b44-9aae-586ba94f8a28/ -
The Windows.Application.VoiceCommandnamespace is missing for JavaScript applications on the phone. Attempts to access properties such as VoiceCommandDefinitionManagerwill return a null or undefined result. As such it is not possible to register voice commands
or call voice command APIs.There is no workaround for phone. However, you can retarget your application for the local machine (desktop) and call the APIs from that environment.
-
When you install Visual Studio 2015 when not connected to the internet, for example from an ISO, you may receive warnings after setup completes for Tools for Windows 10 Universal Apps, Windows 10 SDK, and Emulators for Windows Mobile. These warnings include:
This product did not download successfully: The server did not return the file size.
This product did not download successfully: Signature verification failed on downloaded file.
This product did not download successfully: HTTP Status 502: The server….To fix this issue, your computer must be connected to the internet to download these components.
Make sure your computer is connected to the internet.
Open Control Panel, and select Programs and Features.
Select Microsoft Visual Studio 2015 RC, click Change, and then click
Modify.
Select the feature “Universal Windows App Development Tools”, and click
Update. -
Cortana does not start in the phone emulator. The screen will clear as if Cortana is starting but Cortana is not launched.
There is no workaround for this issue. You may test Cortana on the local machine.
-
When attempting to add a language via the speech settings page, you can select a language to download but the language is not installed correctly on the phone. As a result you cannot test against additional speech languages on the phone.
There is no workaround for this issue.
-
When getting audio feedback from Cortana on a device with multiple playback endpoints (e.g., a device with a headset and an internal speaker), the playback may occur on the incorrect device. For example, Cortana may not send audio to the default device
after the default has been changed in the control panel.There is no workaround for this issue.
-
Cortana may not speak your name when tapping the "Hear how I'll say it" button when setting up your name for the first time or when changing your name in the settings panel.
There is no workaround for this issue. However, you can still complete the process of setting or changing your name.
-
On physical devices, geofences that have been triggered are not causing their associated background task to fire. The device may also incorrectly stop tracking geofences
in connected standby, causing the geofencing trigger to be missed. Within the Windows Phone Emulator, geofences are not triggering in either the foreground or background.Workaround: test the geofencing logic in your app while the app is running in the foreground on a physical device.
-
To deploy to a Windows 10 Mobile device with this release, your device must be running Windows Mobile OS build 10074 or later. When deploying your Universal Windows app to a device with an earlier build, or a Windows Phone 8.1 device, you will get the following
error:
Error : DEP0001 : Unexpected Error: The Appx package's manifest is invalid. (Exception from HRESULT: 0x80080204)Use the Windows 10 Mobile emulator or update your device to Windows Mobile OS build 10074 or later.
-
The Tools for Universal Windows Apps requires Visual Studio 2015 RC. If you have an earlier build installed, for example, Visual Studio 2015 CTP6, you must first uninstall Visual Studio 2015 and the Tools for Windows.
To uninstall earlier versions of Visual Studio 2015 and the tools for Universal Windows app development,
Go to Control Panel, and select Programs & Features.
Select Microsoft Visual Studio 2015 and click Change.
Click Remove, and then Yes.
Next, select Microsoft Visual Studio 2015 Tools for Windows 10, and click
Change.
Click Remove, and then Yes.
Maybe you are looking for
-
Newbie, having a problem with Input in Java
Hello, Thank you for reading this! I am having a hard time understanding this. I am having an awful time with Input into variables. The following code I have got where what I type in anything from the keyboard it stores it in the variable String "nam
-
Whats the difference between high-density and low-density ram?
I bought what I thought was supposed to be a cheap 256 mb chip (pc100 or 133) but the g4 400 read only 128mb, The fellow in the store that sold it flipped out when I told him I had a Mac and said something about high density and low-density.Another g
-
Screen Share Snow Leopard No longer works
Please help!! I used to have no problem sharing screens from my Mac Pro running 10.6.6 with my Mac Pro Book running 10.6.8. When I upgraded my tower to 10.6.8 screen sharing ceased to work as did internet sharing over the eathernet port. I am able
-
HELP! iTunes doesn't recognize my iPod touch
okay well i've had my ipod touch for a few months now and i've never had a problem with iTunes not recognizing it or anything until now. The last time i put new songs on my ipod was december 23/08 and it worked perfectly, but now i go and plug my ipo
-
Apple graphic card replacement
Hi, I own mid 2011 iMac 3,4 i7 model with 6790 2GB graphic card which is broken. Found Apple replacement program for those cards : http://9to5mac.com/2013/08/16/apple-opens-graphics-card-replacement-program-for- some-mid-2011-imacs/ Can someone tell