Visual Studio 2013 : Javascript debugging does not work anymore - Stack Overflow

Hopefully someone will be able to point me in the right direction.I'm using visual studio 2013 t

Hopefully someone will be able to point me in the right direction. I'm using visual studio 2013 to develop a project using MV4 (VB and Razor) with some javascript libraries (jqWidgets, Knockout, etc.)

Not long ago, I was able to use breakpoint in my javascript code and the debugger worked flawlessly.

One day, it stopped working! Not even the statement "debugger;" work. Code just doesn't stop anywhere.

I'm not sure what happened, I think it is related to the fact that IE automatically upgraded from 10 to 11. Since then, nothing works.

I uninstalled IE 11 and reinstalled IE 10, tried repaired on VS2013, tried removing the last update to VS... Nothing works...

Any idea?

Thank you.

Hopefully someone will be able to point me in the right direction. I'm using visual studio 2013 to develop a project using MV4 (VB and Razor) with some javascript libraries (jqWidgets, Knockout, etc.)

Not long ago, I was able to use breakpoint in my javascript code and the debugger worked flawlessly.

One day, it stopped working! Not even the statement "debugger;" work. Code just doesn't stop anywhere.

I'm not sure what happened, I think it is related to the fact that IE automatically upgraded from 10 to 11. Since then, nothing works.

I uninstalled IE 11 and reinstalled IE 10, tried repaired on VS2013, tried removing the last update to VS... Nothing works...

Any idea?

Thank you.

Share Improve this question asked Feb 9, 2014 at 16:46 Benoit LetourneauBenoit Letourneau 2001 gold badge3 silver badges13 bronze badges 2
  • This link has the steps to enable js debugging msdn.microsoft./en-us/library/z959x58c.aspx. Maybe it will help you – Tasos K. Commented Feb 9, 2014 at 17:21
  • Thank you but no, it does not really help. I cannot find the menu items they are referring to in IE 10 nor their equivalent. I had stumbled on this page before but not success... Thanks anyway – Benoit Letourneau Commented Feb 9, 2014 at 22:09
Add a ment  | 

3 Answers 3

Reset to default 3

With my soulution is In BundleConfig.cs at the end change

BundleTable.EnableOptimizations = true
 to 
BundleTable.EnableOptimizations = false;

I finally found my problem. It is very silly once you know it.

My debugging problem was due to the way I used BundleConfig.

I created a bundle to package all my script. I change the bundleconfig to explicitly to use the minified version of my script. Instead, I should have used the "*" and let Visual Studio determine if it should bundle the minified or the debug version. I did that when trying to understand how the bundling was working and forgot about the change.

I was using

    bundles.Add(New ScriptBundle("~/bundles/bSoftOptimax").Include(
        "~/Scripts/bSoft/bSoftOptimax.min.js"
        ))

Instead of

    bundles.Add(New ScriptBundle("~/bundles/bSoftOptimax").Include(
        "~/Scripts/bSoft/bSoftOptimax*"
        ))

I didn't remember doing this and debugging stopped working for my javascript.

I think by using "*" you tell VS to create the proper bundle depending if you are debugging or creating an release version of you code.

Thank you your answers, hope this can help somebody else.

Visual Studio 2013 has a cool new feature called Browser Link which makes your life a lot easier. Try from the following and let me know how it goes: http://www.asp/visual-studio/overview/2013/using-browser-link

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744753969a4591767.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信