1

I have Page1.aspx page which has Page2.aspx page embedded in it inside a div element. Now I am unable to hit debugger in the JavaScript included in Page2.aspx

below has the code snippet for understanding. Page1.aspx

<div id="SomeDiv" style="background-color: white;"></div>   

Page1.js //Code to load the new page within a div tag

$("#" + 'SomeDiv').load(Page2.aspx, {}, function () {//...  });

Now Page2.Aspx has JavaScript page Page2.js

I am unable to hit debugger on Page2.js. Is there any solution to do that.

I tried F12 but unable to see Page2 in debugger.

I have only IE explorer. Thank you.

R15
  • 13,982
  • 14
  • 97
  • 173

2 Answers2

0

Type debugger; command in start of your script (As first line in script tag). Then press f12 and refresh your page.

Also remove check of this: Internet Options - Advanced - Disable Script Debugging

Hassan Sadeghi
  • 1,316
  • 2
  • 8
  • 14
  • 1
    I remember that IE has an option to enable debugger (after press F12). If it is enable now, debugger must works correctly. I use this always. Also check my response update. – Hassan Sadeghi Jul 16 '18 at 13:22
0

Here myself answering my question. I came to know that there was two debugger processes running in Visual Studio 2015. Below steps helped me to resole the issue:

  • Go to debug tab in VS
  • Click on windows
  • Select processes and delete the "IE.exe" process and keep the "IIS" one

Can also look into this answer: the script debugger failed to connect to the target process. Adebugger is already attached

Hope this will help others in future.

R15
  • 13,982
  • 14
  • 97
  • 173