Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"A specified communication resources(port) is already in use" when attaching the debugger

I have just upgrade my windows phone 8 to windows phone 8.1. When I connect my phone to pc and run my project it gives me

a specified communication resources(port) is already in use by another application.

I restarted my PC and Phone, removed all connected external devices but still getting same error while running my code through Visual Studio 2012.

I can see it's deployed on phone but I can't debug it. Debugger is not attaching.

Here is my screen shot:

enter image description here

like image 278
Ajay Avatar asked Apr 15 '14 15:04

Ajay


4 Answers

We need to update visual studio 2012

Go to Tools->Extensions and update->updates and update the visual studio update 4

like image 75
jee Avatar answered Nov 25 '22 03:11

jee


You may need to deploy the app on the phone before debug mode can be ran. Right click the project and select Deploy. Use this link to see more detailed information.

like image 41
Lukkha Coder Avatar answered Nov 25 '22 04:11

Lukkha Coder


A specified communication resources(port) is already in use by another application

This is a generic error for any failure when Visual Studio attempts to connect it's debugger. There is no silver bullet solution to this problem. The problem persists in Visual Studio 2013, and on Windows Phone 8.1. You'll often notice that the application is actually deployed, but the debugger just couldn't attach itself.

However, uninstalling anything is never a correct solution to this problem.

Now, generally the following options can fix the 'problem' (sometimes one or more are required):

  • Unplug, and re-plug the USB cable
  • Uninstall the application from the phone and redeploy from Visual Studio
  • Redeploy from Visual Studio
  • Restart the phone
  • Restart Visual Studio

Bad USB cables or USB ports can also cause this issue.

like image 36
Claus Jørgensen Avatar answered Nov 25 '22 02:11

Claus Jørgensen


I had exactly the same problem. In my case installing Update 4 RTM for VS 2012 helped and I could once again debug my apps (previously, I had Update 4 RC installed). However, the error still appears if I open VS 2012 and VS 2013 side by side - if only one of them is open at the time then the error won't pop up.

Updating to Vs2012 Update 4 RTM, then we can debug on Phone

like image 31
Piotr Avatar answered Nov 25 '22 02:11

Piotr