Visual Studio Community 2017 stops debugging when

2019-07-09 02:06发布

I am working on an apache cordova app. I do two different debugging, first is on my localbrowser(chrome) and then on an actual device. When debugging in chrome, I set break points inside VS and all are hit. Then when on chrome when I open the developer console, it stops the debugger. I swear that this never happen before. Any suggestions? I found some post that are almost related to my problem but it never solves them.

At first I thought the debugger stops because of my option settings in Visual studio, but I started a new blank(apache project) project and it works. Then I added my js, html, css files and settings to this new blank project. And there it goes, the debugger stops when I open chrome developer tool. I ran out of ideas. Please help.

3条回答
Explosion°爆炸
2楼-- · 2019-07-09 02:33

In VS 2017 Go to Tools->Debugging->General then check

Enable Javascript Debugging For ASP.NET(Chrome, Edge, and IE)

Hope that helps you.

查看更多
乱世女痞
3楼-- · 2019-07-09 02:38

I try to debug it in my VS2017, All projects get the same result as yours, it would stop VS debugging if we click F12 to start the chrome developer tool.

As you said that the blank project worked well in your side, if possible, you could check that whether you changed any settings in your side. I just use the default settings.

Of course, you could also reset your VS settings in your side, and then re-debug your blank project, view the result.

TOOLS->Import and Export Settings Wizard->Reset all settings->select “No, just reset settings, overwriting my current settings”->Choose a Default Collection of settings.

My understanding it is the normal action if it stopping VS debugging after you start the browser debugging, since generally we could use one debugger for one process.

查看更多
做个烂人
4楼-- · 2019-07-09 02:58

Prior to V 63 of chrome, it would not allow multiple remote debugging sessions. Opening the chrome debug tools would take over the only available connection, and terminate the one held by VS.

However this has now been rectified by the chromimum team !

Unfortunately there is still a problem with the Visual Studio debugging session getting terminated when F12 is hit.

There is a workaround, and hopefully the VS team will correct the underlying issue. See my post on MSDN for full details

查看更多
登录 后发表回答