Debugging javascript for webforms project hosted on iis

422 Views Asked by At

I have a webforms project hoted on iis that i run on internet explorer. For debugging the server code on visual studio i place a 'stop' on the required position or attach to w3 process in visual studio. However i am unable to do so if i want to debug the client side js code. I can place a debugger in the js file and in the js file rendered to the browser the debugger is present however it is not hit while the page executes. Ex: i have placed a debugger in the onload() method but does not hit. Can anyone tell a better, structured way that actually works..

2

There are 2 best solutions below

0
On

The client side debug must work if you have attached #debugger keyword in the javascript. In order to #debugger work, you must press F12 and keep the IE in the developer mode. I guess that's the problem in your case.

0
On

Please check whether script debugging is enabled in your IE.

  • Open Internet Explorer
  • Go to Internet Options
  • Go to the Advanced Tab
  • Set both Disable script debugging to unchecked

enter image description here