Reputation: 14071
With VS2012 and IE9 I can use the VS2012 JavaScript debugger from within VS2012 (similar to C#, ..). When I switch the browser to Chrome, I loose the ability to do so. I could switch to the the Chrome intrinsic debugger.
But, is there a way to get debugging with Chrome working with VS2012 (similat to IE)?
Example: Breakpoint hit with IE, but not with Chrome as browser.
Remark: No duplicate of Debugging Websites with Google Chrome which is about .net debugging. I am not using any ASP.net, only JavaScript
Upvotes: 6
Views: 6791
Reputation: 1846
This is now possible. See this page for how, but in a nutshell (using Windows 10 1607, Visual Studio 2015 with Update 3):
Also, see this page which confirms this feature will be added to a future Visual Studio release.
Upvotes: 3
Reputation: 113
inside a javascript place a "debugger;" command and refresh the page.
works in CHROME v30> and IE 10>
Example:
<script type='text/javascript'>
function LoginEstabelecimento() {
var form = $('form#formLoginEstabelecimento');
debugger;
... SOME REST OF CODE ...
};
</script>
Upvotes: 6
Reputation: 5407
You can always right click the page in Chrome, choose 'inspect element' and use chrome's built-in javascript debugger.
Upvotes: 3
Reputation: 629
No it's absolutely impossible to debug JS in Chrome from VS, because it's a completely different internal engine. May be somebody will write a plugin for VS, but right now it's not possible.
Upvotes: 16