Reputation: 407
I have installed VS2017 and trying out the new stuff they added. One of the nice things is chrome JS debugging but I can't seem to hit a break point.
I created a new .net core website (.net core 1.1) and add the following function into the site.js file
function test() {
var a = "message";
console.log(a); };
I then add a break point on the line "var = a..."
run the website - it opens a new chrome window and attaches to the process like it should. I then press F12 and call test() but no break point is hit it just outputs to the console.
One thing that is also in the console window is the following message -
Browser Link: Failed to invoke return value callback: TypeError: Cannot read property 'files' of null
however i also get this message when trying it out in IE11 and it does hit the break point in IE
I have updated my chrome to the latest version - 57.0.2987.98 I am running windows 10 pro (fully up to date)
Any ideas what it might be?
I have tried on the following computers -
All 3 failed to hit the break point
Whats odd is someone else at work is able to make it work without an issue.
Upvotes: 6
Views: 6979
Reputation: 2712
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
Upvotes: 0
Reputation: 743
As soon as you hit F12 in chrome, which opens the Chrome Dev Tools, it kills the client-side debugging session.
Perhaps try executing automatically... e.g... (untested)
(function test() {
...
})();
Upvotes: 5