Shiridish
Shiridish

Reputation: 4962

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

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:

enter image description here

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?

Upvotes: 0

Views: 157

Answers (1)

Marwan
Marwan

Reputation: 2402

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

Upvotes: 1

Related Questions