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

Maybe you are looking for

  • Logon ticket missing; Single Sign-On is not correctly configured

    Dear Experts, we have tried to configure SSO on SAP PI environment, but without success. Can you pls advise where to look for fixing the SSO? regards, PM

  • HT3924 Target Display mode screen direction

    Can anyone advise on how to change the direction of screen link whilst in Target Display mode? My lap top sits to the right of my iMac due to the length of Thunderbolt. Screen link goes from right of laptop to left of iMac, would like to swap to left

  • 10.4 HP 3180 printer cant print or add

    I was able to print with no problem and now I cant, I reinstalled the software for the printer and restarted the computer. i dont get an error i just cant add the printer now. its on the computer but when you go into the add printer/fax it does not s

  • Zip files related to startCD

    Hi, Can you please help me what are the zip files in 12.1.1 for Linux86-64 related to startCD. I think these are related to startCD. B53824-01_1of4.zip B53824-01_2of4.zip B53824-01_3of4.zip B53824-01_4of4.zip Thanks, Kavitha

  • Exporting from GB3 to GB2 or GB1?

    If I have a song in GB3, and I want to export it to another Mac running GB2, is there any problem with this? How about GB3 to GB1? Can songs be exchanged between different versions of Garageband? I'm in a band where currently, one guy has GB1 on an i