Active Debugging
A popular extension to Active Scripting is Active Debugging, a technology that allows you to debug your scripts. Regardless of the language your scripts are implemented in, you can debug them in a single debugging environment provided by Microsoft. Interestingly, this allows you to step through multiple languages; for example, as Python code calls VB code that calls Python code, you can step through each individual line.
Microsoft provides two Active Debugging environments. The
Windows Script Debugger is a free tool
available from http://msdn.microsoft.com/scripting/
, and while a nice debugger,
the Microsoft Visual Interdev provides a
richer debugging environment. The only drawback with Interdev is that
it comes with Microsoft Visual C++ and is not available for free
download.
There is not much to say about Active Debugging when using Python. You simply use the debugger, and Python is right there, ready to be debugged.
Unfortunately, the Active Debugging specification is new and not
everything works quite as expected. For example, it’s
impossible to debug scripts under Internet Explorer 4, as the Active
Desktop enhancements cause the debugger to complain that you are
attempting to debug the desktop. A solution to this particular
problem is to debug your script using a different
EXE that still uses the IE4 control, e.g.,
PythonWin and the webrowser.py sample. A further complication is that not all Active Scripting hosts support Active Debugging. The Debugging interfaces ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access