如何在Visual Studio 2008的.ASPX页面中的Javascript代码中使用断点

时间:2022-12-25 02:46:36

I have Javascript in my .aspx design source page. How can i set breakpoints and run as i set it for a .cs page. I am using Visual Studio 2008 for my coding. I have browsed for the use of debugger. But i couldn't get how to use it properly. If debugger; is used, can someone elaborate on how its used.

我的.aspx设计源页面中有Javascript。我如何设置断点并运行,因为我为.cs页面设置它。我正在使用Visual Studio 2008进行编码。我浏览了调试器的用法。但我无法得到如何正确使用它。如果是调试器;使用,有人可以详细说明它是如何使用的。

1 个解决方案

#1


1  

If you put a debugger; statement and you're using IE, the browser will throw a "Script Debugging" error and prompt you for a debugging tool, you can select VS 2008 from the list.

如果你放一个调试器;声明并且您正在使用IE,浏览器将抛出“脚本调试”错误并提示您输入调试工具,您可以从列表中选择VS 2008。

Make sure to have the "Disable Script Debugging" options in IE unchecked.

确保未选中IE中的“禁用脚本调试”选项。

Alternatively, you can use "Debug > Attach To Process" and attach the debugger to your browser processes, after that you can put a regular break point from visual studio on your javascript code and it will work.

或者,您可以使用“Debug> Attach To Process”并将调试器附加到您的浏览器进程,之后您可以从visual studio中为您的javascript代码添加一个常规断点,它将起作用。

#1


1  

If you put a debugger; statement and you're using IE, the browser will throw a "Script Debugging" error and prompt you for a debugging tool, you can select VS 2008 from the list.

如果你放一个调试器;声明并且您正在使用IE,浏览器将抛出“脚本调试”错误并提示您输入调试工具,您可以从列表中选择VS 2008。

Make sure to have the "Disable Script Debugging" options in IE unchecked.

确保未选中IE中的“禁用脚本调试”选项。

Alternatively, you can use "Debug > Attach To Process" and attach the debugger to your browser processes, after that you can put a regular break point from visual studio on your javascript code and it will work.

或者,您可以使用“Debug> Attach To Process”并将调试器附加到您的浏览器进程,之后您可以从visual studio中为您的javascript代码添加一个常规断点,它将起作用。