The IIS web server manager also has a UI option for enabling server-side script debugging. In the same way, you need to explicitly enable debugging of scripts in the Windows scripting hosts ( cscript.exe/ wscript.exe) using the //X option if you want to also debug the executed scripts. In many ways, the PDM component serves the same purpose that the CLR runtime debugger controller thread and mscordbi.dll serve during managed debugging, as illustrated in Figure 3-7.įigure 3-8 Enabling Internet Explorer script debugging. A Process Debug Manager (PDM) component ( pdm.dll) is shipped with the Visual Studio debugger to insulate script engines from having to understand the intricacies of script debugging. All recent versions of Internet Explorer, IIS, and the Windows scripting hosts are smart hosts that implement those interfaces, which is at the heart of the magic that enables Visual Studio to debug scripts hosted by any of those processes. An Active Scripting host that supports debugging (that is, implements the required COM interfaces) is called a smart host. In addition, the Active Scripting specification also defines a contract (a set of COM interfaces, again) for debuggers to take advantage of the host in their operations. There are also third-party Active Scripting engines to support other script languages, including Perl and Python. Examples of Active Scripting hosts include the Internet Information Services (IIS) web server (server-side scripts embedded in ASP or ASP.NET pages), Internet Explorer (client-side script hosting in web pages), and the Windows scripting hosts ( cscript.exe or wscript.exe) that ship with Windows and can be used to host scripts executed from a command prompt. Examples of Active Scripting engines are vbscript.dll and jscript.dll, which both ship with Windows under the system32 directory. The Active Scripting specification defines a language-processing engine, with the Active Scripting host using that engine when the script needs to be interpreted. In Windows, both VBScript and JScript (Microsoft’s implementation of JavaScript) are Active Scripting languages whose implementation fully conforms with that specification. This specification was introduced by Microsoft in the 90s and defines a set of COM interfaces to allow script languages that implement them to be hosted in any conforming host application. The key to that architecture is the Active Scripting specification. To understand how script debugging works, it’s useful to first explain a few basic concepts about how script languages are executed in Windows. In both cases, the debugger needs the script host’s or the CLR execution engine’s collaboration to support source-level debugging of the target process. One of the reasons that the CLR used the in-process debugging model when it was first released to the public in 2002 was that script debugging had been successfully using it for years (since the mid-90s). This is internally implemented using the same in-process paradigm that managed-code debugging relies on. Visual Studio also supports source-level debugging of script languages such as VBScript or JScript.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |