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

  • 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