Unable to reach a break point in Javascript inspite of writing debugger- Visual studio 2008

淺唱寂寞╮ 提交于 2019-12-12 05:08:17

问题


I have read several posts on SO regarding how to place break points in java script functions in debug mode. An easy solution was writing debugger where I need to have a break point. But unfortunately that doesn't work for me. I gave - <compilation debug="true"> in web.config and wrote debugger in javascript whereever I need to have a break point. But no use.

A screen shot for what exactly i did:

I call this drouote() on button click and it does execute, but the break point isn't hit. Where am I wrong? Also where will this code be shown on reaching a break point, in chrome console or in visual studio?


回答1:


You Have 2 Options in 2 Browsers

if you need to debug in Visual Studio you have to work with IE ,also you have to press Run in VS and have your break point placed.

I see this as a hard way

the easy way is on FireFox download firefox browser and then add the FireBug addon from firefox addons website run the firebug with F12 and enable the Consol and Script Pans then open your page and debug your javascript but be note here that you have to place the debugger keyword in that case till you learn much about firebug you then will know how to place a breakpoint in firebug instead of placing debugger keyword

Regards if you need and more help contact me



来源:https://stackoverflow.com/questions/12338546/unable-to-reach-a-break-point-in-javascript-inspite-of-writing-debugger-visual

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!