简体   繁体   中英

Implement immediate window for vbscript

I Have implemented a debugger using C#. It uses MSSCRIPT.ocx as a vbscript engine. Can anyone tell me how i can implement immediate window feature in it.

Desired Feature:

Should Show all the available variables along with their values :

Eg

i = 1

j = i+2

[Break Point]

k = 3

On hitting the breakpoint ,immediate window should display i=1 , j=3

Any way to fetch variables at runtime from a vbscript code ?

MSScript wraps up a whole pile of interfaces.

SUMMARYActive Scripting is a powerful tool for adding advanced features such as macro capabilities to custom applications. This creates a need for integrated debugging services for new features added with scripting. To address this need, Microsoft has provided a set of COM interfaces for developing debugging services from within the Active Scripting framework.

This article illustrates how to use the debugging services published within the Active Scripting framework to create a full-featured script debugger that can provide a multitude of debugging actions including setting breakpoints, call stack viewing, variable browsing, immediate-window viewing, thread enumeration, and application enumeration.

Active Scripting APIs: Add Powerful Custom Debugging to Your Script-Hosting App

See https://msdn.microsoft.com/en-us/magazine/cc301316.aspx

and for the 10 million interfaces. https://msdn.microsoft.com/en-us/library/6dy78b76(v=vs.94).aspx

And this is what help says about using the script control.

To make implementation of the host as flexible as possible, an OLE Automation wrapper for Windows Script is provided. However, a host that uses this wrapper object to instantiate the scripting engine does not have the degree of control over the run-time name space, the persistence model, and so on, that it would if it used Windows Script directly.

Having said that, you can add you own code to do eval and execute in your script with imagination.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM