26

I am getting this error whenever I try to debug my project from visual studio.

I tried adding these settings to launchSettings.json but still no difference.

"protocol": "legacy", "runtimeArgs": [ "--debug=5858" ], "restart": true, "port": 5858,

enter image description here

what I am I doing wrong here.Any suggestions to resolve this ?

1
  • Before running around to any suggested answers, try closing Chrome/Firefox running the debugging again. Commented Sep 6, 2019 at 7:57

11 Answers 11

57

I used to receive similar error. Every time I tried to debug the process was crashing, this was related to javascript debugging.

inside Debug -> Options you can disable it.

Just uncheck the highlighted one: enter image description here

Sign up to request clarification or add additional context in comments.

3 Comments

That's not a solution though. That's giving up, essentially.
@MichaelDunn this is a bug in visual studio, I can’t rewrite their code, considering that’s a new feature, no ones gonna to miss it. For now just debug using the chrome console :/
Thanks! This also greatly shortens the time to ramp up the VS debugger!
15

Make sure to disable JavaScript debugging.

Capture

1 Comment

This helped me out to resolve issue at my end... thanks for your help :) Upvoted
8

What worked for me it was: disabling Chrome run on background

Disable Chrome to run on background

You can then re-enable that on Chrome advanced settings: Change chrome advanced settings

This was very annoying problem. I hope it can help someone else having the same issue.

1 Comment

Thank you, thank you, thank you! I have been "Ending Task" for over a month EVERY single time I've tried to debug run an application in Chrome. I've read all sorts of responses about which debugger or legacy debugger, etc. In the end, this fixed it instantly! I can't tell me how much frustration you have just alleviated!
2

Had this issue today. Tried closing Visual studio 2017 and IIS Express but issue was still occurring. Tried running VS 2017 as Admin still got error. In the end I restarted Windows and issue no longer occurs.
By just restarting I was able to keep the "Enable JavaScript debugging for ASP.NET (Chrome, Edge and IE)" enabled.

Comments

2

Open task manager, 'End task' which ever browser you are using to debug. After killing process of the browser (chrome or edge or mozilla ), try to debug again. It will work.

2 Comments

Please add further details to expand on your answer, such as working code or documentation citations.
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker.
1

I've seen this error if I don't run Visual Studio as an Administrator.

If you're not already doing so, right-click the VS icon in the start tray, right click your version of Visual Studio from the pop-up, and select "Run as administrator." Then load and run your project.

Comments

1

FYI for anyone having this issue, I just discovered on my system that Apple has a new iCloud Service that is using the default port 1692 for IIS Express in my project. I am looking into how to change the port in Visual Studio 2017.

Comments

0

I had installed another file editor (Code Writer) that set itself as the default program for a whole host of files that were previously set to Visual Studio. Between a combination of doing a VS Installer Repair, and manually changing other associations back to VS, and a reboot, it's working for me again.

Comments

0

I found two processes in the task manager running "Internet Explorer" with the good old IE-Icon. After killing them, debugging was working again. I also closed all Chrome-Processes. I am not sure if that is related, but I doubt it because I already tried that in the past.

Comments

0

Had this issue in an ASP.NET Core project because in the project settings on debugging I had checked start browser but by mistake with an empty url. After I set the app url (http://localhost:5000 by default), it works well.

You can also set this in the <project>/Properties/launchSettings.json file:

"applicationUrl": "http://localhost:5000" 

Please note to set this to your app profile (IIS or if you want to use the build in webserver, the name if your app as key instead).

Comments

0

Disable Script Debugging in Debugging options.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.