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
Tips for debugging in the web browser You can debug in the browser by pressing F12 to open the Developer Tools. Unchecking the option allows to debug in JavaScript rather than C#.
Pressing F5 (Start Debugging) Activating the debug icon in the menu bar and selecting "Run and debug" Opening the Visual Studio Code command palette and running the "Debug: Open Link command"
Setting and Debug In Google ChromeGo to "Tools" then click on "JavaScript console". Run the application and insert values into the input fields then click on the "Addition" button. The cursor will then reach the debugger in the source tab under the JavaScript console window.
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.
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With