admin管理员组文章数量:1323524
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 core website ( 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?
Update
I have tried on the following puters -
- My home PC (Windows 10 Pro)- has VS2015 and VS2017 on it
- Work PC (Windows 8.1 Pro) - also has VS2015 and VS2017 on it
- With in my work PC - (new build) HyperV VM (Windows 8.1 Pro) - just VS 2017 on it
All 3 failed to hit the break point
Whats odd is someone else at work is able to make it work without an issue.
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 core website ( 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?
Update
I have tried on the following puters -
- My home PC (Windows 10 Pro)- has VS2015 and VS2017 on it
- Work PC (Windows 8.1 Pro) - also has VS2015 and VS2017 on it
- With in my work PC - (new build) HyperV VM (Windows 8.1 Pro) - just VS 2017 on it
All 3 failed to hit the break point
Whats odd is someone else at work is able to make it work without an issue.
Share Improve this question edited Jun 20, 2020 at 9:12 CommunityBot 11 silver badge asked Mar 9, 2017 at 21:02 Thomas JamesThomas James 4079 silver badges19 bronze badges 1- Be sure to run Visual Studio as administrator. – Rudey Commented Mar 15, 2017 at 19:44
2 Answers
Reset to default 5As soon as you hit F12 in chrome, which opens the Chrome Dev Tools, it kills the client-side debugging session.
See: https://blogs.msdn.microsoft./webdev/2016/11/21/client-side-debugging-of-asp-net-projects-in-google-chrome/
Perhaps try executing automatically... e.g... (untested)
(function test() {
...
})();
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
本文标签: Visual Studio 2017 Chrome JavaScript DebugingNot hitting break pointStack Overflow
版权声明:本文标题:Visual Studio 2017 Chrome JavaScript Debuging - Not hitting break point - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742133414a2422264.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论