(Kaynak: HOWTO: Debugging JavaScript using "debugger;" )
There are a lot of developers who write custom JavaScript or need to debug pre-written JavaScript, yet do not know that they can debug it in Visual Studio 2005. This is a fairly simple process.
Visual Studio offers the developer the ability to utilize the IDE to debug, just like you would debug if you are debugging .NET code. How? Very simple, the "debugger;" key word.
How It Works
First, you must enable script debugging in Internet Explorer (we will get that in a minute, first lets look at some code).
To debug: Write your JavaScript and place the "debugger" keyword where ever you want the code to break into debugging. The JavaScript interpreter hits this keyword and halts execution and returns the control back to the IDE. This is like setting a breakpoint inside of Visual Studio.
Hiç yorum yok:
Yorum Gönder