简体   繁体   中英

Visual Studio 2017 Error --Cannot connect to runtime process

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,

在此处输入图片说明

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

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: 在此处输入图片说明

Make sure to disable JavaScript debugging.

捕获

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

禁止 Chrome 在后台运行

You can then re-enable that on Chrome advanced settings: 更改 Chrome 高级设置

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

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.

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.

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.

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.

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).

在调试选项中禁用脚本调试。

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM