I just installed Visual Studio 2017. After starting an ASP.NET MVC application I get the message that chrome debugging in Visual Studio is enabled.
But my breakpoints in Visual Studio won't hit. The breakpoints on Razor code seems to be working but Javascript does not. The breakpoints are not fully red like they should be. A restart, rebuild don't seem to take any effect.
I have the following code example
@Html.Partial("_Test", Model.Test) // debugging works here
<script>
var i = 1;
console.log(i); // debugging does not work here or above
</script>
@section scripts {
<script>
var a = 11;
console.log(a); // debugging does not work here or above
</script>
}
I don't have the chrome debugging console open and I checked the option in Visual Studio ('Enable Javascript debugging..') which is enabled.
According to this blog post I thought this should work:
https://blogs.msdn.microsoft.com/webdev/2016/11/21/client-side-debugging-of-asp-net-projects-in-google-chrome/
Am I missing something here? Could it be that this is not working in Visual Studio 2017 somehow?
I only have one extension and that is Resharper, but I guess this is not an issue.
question from:
https://stackoverflow.com/questions/42669163/javascript-breakpoints-in-visual-studio-2017 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…