无法在Javascript中创建一个断点,这就是编写调试器 - Visual studio 2008 [英] Unable to reach a break point in Javascript inspite of writing debugger- Visual studio 2008

查看:152
本文介绍了无法在Javascript中创建一个断点,这就是编写调试器 - Visual studio 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经阅读了关于如何在调试模式下在java脚本函数中设置断点的几个帖子。一个简单的解决方案是在我需要一个断点的情况下写入 debugger 。但不幸的是,这不适合我。
我在web.config中给了 - < compilation debug =true> ,并在javascript中写了debugger,我需要有一个断点。但是没有用。

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:

我按下按钮,将其称为drouote()执行,但断点不受打击。我在哪里错了?
此代码在何时到达断点,Chrome控制台或Visual Studio中显示?

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?

推荐答案

您有两个浏览器中有2个选项

You Have 2 Options in 2 Browsers

如果您需要在Visual Studio中进行调试,您必须使用IE,还必须按下VS中的运行并具有断点

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

简单的方法是在FireFox下载firefox浏览器,然后从firefox addons网站添加FireBug插件使用F12运行firebug,并启用Consol和Script Pans
然后打开您的页面并调试您的JavaScript,但请注意,您必须在该情况下放置调试器关键字,直到您学习那么关于firebug你就会知道如何在firebug中放置一个断点,而不是放置调试器关键字

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

这篇关于无法在Javascript中创建一个断点,这就是编写调试器 - Visual studio 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆