How to Enable DIAdem Script Debugger on Windows 7/8/8.1/10

Updated Jan 3, 2023

Reported In

Software

  • DIAdem

Operating System

  • Windows

Other

  • Microsoft Script Debugger

Issue Details

I would like to use the debugging tool in DIAdem Script Panel, but the functions are grayed out. What can I do?

Solution

DIAdem 2017 (or later): 
In DIAdem 2017 (or later), the DIAdem installer automatically registers the PDM dll, thus no further action is required. In addition, if the registry key for Just-In-Time (JIT) debugging is set, then it is also possible to debug DIAdem with an external debugger. 

DIAdem 2015 SP2 (or earlier): 
The registration process of the PDM dll is different depending on the version of the OS and the bitness of the DIAdem software. To register the dll, run cmd in admin (elevated) mode and type the command below that corresponds to your software configuration. This list assumes a 64-bit Windows environment.
Windows 7/8/8.1 and DIAdem 64-bit: 
Regsvr32.exe "C:\Program Files\Internet Explorer\pdm.dll" 

Windows 7/8/8.1 and DIAdem 32-bit: 
Regsvr32.exe "C:\Program Files (x86)\Internet Explorer\pdm.dll" 

Windows 10 (up to version 1511) and DIAdem 64-bit: 
Regsvr32.exe "C:\Windows\System32\F12\pdm.dll" 

Windows 10 (up to version 1511) and DIAdem 32-bit: 
Regsvr32.exe "C:\Windows\SysWOW64\F12\pdm.dll" 

With Windows 10 version 1607 and forward, pdm.dll can no longer be registered manually, but must be automatically registered by a Microsoft product. If trying to register manually, RegSvr32 will throw error 0x80070715.



One way to automatically register the dll is to install Microsoft's Remote Tools for Visual Studio. Download x64 for 64-bit DIAdem or x86 for 32-bit DIAdem. This free tool will install and register the PDM. After the install, DIAdem will recognize the registered dll in the following paths: 
 
64-bit: 
C:\Program Files\Common Files\Microsoft Shared\VS7Debug\pdm.dll 

32-bit: 
C:\Program Files (x86)\Common Files\Microsoft Shared\VS7Debug\pdm.dll 


When complete, open DIAdem again and go to the Help >> About >> Script Engine tab to verify that the debugger has been registered.


After installing the Microsoft's Remote Tools for Visual Studio make sure to click on Use External Script Debugger

image.png

Additional Information

DIAdem Script is based on VBScript which relies on the Microsoft Script Debugger that was released in 1997. This tool could be used to debug Visual Basic scripts (VBScript) or Java scripts (JScript) and was a complement to products such as Internet Explorer 4.0 and Internet Information Server 4.0. Until recently, it was a tool that Microsoft provided as a separate download on their homepage. It installed a shared library called the Process Debug Manager (PDM), which DIAdem uses to debug its own VBScripts. 

The original version of the Microsoft Script Debugger can still be found at this forum post, but is limited for use with 32-bit DIAdem. It provides the user with the older version 6.0.0.8424 of the PDM library. 

With Windows 7/8/8.1/10, users do not need to install this file separately, provided they have either MS Office or Visual Studio installed. It also installs with Internet Explorer 8 and above but is not registered (see above steps for registering the PDM dll). As the PDM library is already available on these systems, you only need to make sure the active dll is registered in order for DIAdem to recognize it.