最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

c# - Break point is not hitting in javascript file - Stack Overflow

programmeradmin1浏览0评论

I'm facing some trouble on break point in Visual Studio 2013 update2

What the issue is:

I'm having a place where the button has to Submit. On submitting of button, I need to call a java script function, later it should go to some function in c#. This is the work flow. Here, I kept a break point on a line in JS file, and C#. Now, on submitting, the break point hits the js line but it suddenly disappear and move to c# line.

What I tried is:

As soon as i got this error, i start to surf in google. After a long time i found the below things to resolve. But none helps me to e out of this issue.

  1. I restarted My Visual Studio
  2. I wrote 'debugger' in the place of breakpoint line.
  3. I unchecked silverlight in solution properties window.
  4. Added TabProcGrowth in Registry Editor.

I tested in IE8 and chrome. Nothing works.

I updated my IE8 version to IE11 version in one of my friend's system. It's working fine there.

What I want is:

I want to able to check the place where i inserted break point in my Java Script file using VS2013 and IE8. Thanks in advance.

Note: Break point is hitting but it's not standing for more than 2 or 3 seconds.

I'm facing some trouble on break point in Visual Studio 2013 update2

What the issue is:

I'm having a place where the button has to Submit. On submitting of button, I need to call a java script function, later it should go to some function in c#. This is the work flow. Here, I kept a break point on a line in JS file, and C#. Now, on submitting, the break point hits the js line but it suddenly disappear and move to c# line.

What I tried is:

As soon as i got this error, i start to surf in google. After a long time i found the below things to resolve. But none helps me to e out of this issue.

  1. I restarted My Visual Studio
  2. I wrote 'debugger' in the place of breakpoint line.
  3. I unchecked silverlight in solution properties window.
  4. Added TabProcGrowth in Registry Editor.

I tested in IE8 and chrome. Nothing works.

I updated my IE8 version to IE11 version in one of my friend's system. It's working fine there.

What I want is:

I want to able to check the place where i inserted break point in my Java Script file using VS2013 and IE8. Thanks in advance.

Note: Break point is hitting but it's not standing for more than 2 or 3 seconds.

Share Improve this question edited Jun 24, 2015 at 15:29 Arindam Nayak 7,4724 gold badges35 silver badges50 bronze badges asked Jun 17, 2015 at 11:34 gkrishygkrishy 7561 gold badge8 silver badges33 bronze badges 18
  • use debugger in javascript..just write "debugger;" in javascript function – sangram parmar Commented Jun 17, 2015 at 11:37
  • Is your debug javascript enabled in IE ? – Shrivallabh Commented Jun 17, 2015 at 11:39
  • @sangramparmar I wrote in javascript function only. – gkrishy Commented Jun 17, 2015 at 11:48
  • 1 Provide more code, details, type of broswer, ?? – user586399 Commented Jun 17, 2015 at 12:01
  • 1 Please provide your code for help – User125 Commented Jun 22, 2015 at 7:43
 |  Show 13 more ments

4 Answers 4

Reset to default 4 +25

Even you Can debug your Code in Chrome also please follow these steps and tell me the Oute..

1.Keep the 'debugger' to the function where you want to fire the Debug Point.

2.Now open the Chrome and Press F12 (Developer Tools)

  1. Click on "Sources"

Now try to open the Page where the java script function exists.. automatically debugging mode will be fired and you can see what actually happens, (Any Errors in script )

Is your JS break point outside of the context of your AJAX request? If so, is the AJAX request firing before your break-pointed JS line?

If so it may scan over the AJAX request and select your JS break-point... until the AJAX request (fired previously) is received by the C# class which then over-rides the previous break-point set inside VS?

AJAX isn't synchronous, so it'll fire the request the continue procedural down the rest of the function, and deal with the result of the AJAX request when it's received.

  1. First ensure there is no JavaScript related errors on the page
  2. Ensure your AJAX call is not firing before hitting to breakpoint
  3. Check your JavaScript related settings on your browser (according to you, this was working on your friend's machine)

The debugger keyword

Supported in the following document modes:

Quirks, Internet Explorer 6 standards, Internet Explorer 7 standards, Internet Explorer 8 standards, Internet Explorer 9 standards, Internet Explorer 10 standards, Internet Explorer 11 standards. Also supported in Store apps (Windows 8 and Windows Phone 8.1). See Version Information.

Also go for more information

How to debug Javascript with IE 8

发布评论

评论列表(0)

  1. 暂无评论