Yesterday I was in for a very pleasant surprise - I’ve just installed Visual Studio 2008, and was working on a QTP test, when I’ve noticed a something strange with QTP’s Debug view.
Usually when you add a watch to an Object, QTP will present it as an enigmatic "<Object>", with no further description. If you’re really lucky, it will be accompanied by a small "+" sign, which will expose some of the object’s properties. In this example, oDic is a Scripting.Dictionary object I’ve created. You can see that it has a .Count property, Item property, etc.:

It’s important to note that a Scripting.Dictionary object has many properties and methods that are not shown in QTP’s debug window - .Keys, .Items, .Remove, .Add etc.
However, after installing VS2008, my debug view presented oDic with an enigmatic "{…}" instead of the usual "<Object>". It caught my attention, so I’ve clicked the small "+" sign next to it, and found this:

Well, this seems to be a whole new ballgame! The debug mode now show previously unseen properties (Key), and even all the object’s methods! Not only that, but the methods show their inner descriptions - for example, we see that .Add expects two parameters - Key and Item.
This immediately got me thinking: if we get this level of details for a Scripting.Dictionary object, what about real-world runtime objects? Here’s the new debug view for a WebButton runtime object (previously only shown as <Object>):

As you can see, it’s pretty much like looking at the Object Spy’s Runtime-Tab, only better, as here we can even drill one level down. This means that we can expand the .Attribute inner node, and see all the web-object’s attributes. Similarly with .Children, .CurrentStyle etc. It seems that we gained a once unthinkable capability to reflect on our test objects and their corresponding runtime objects.
The new capabilities also show the potential to improve our understanding of QTP’s inner mechanisms. For example, the QTP Reporter object usually shows only a handful of properties and methods. But now, through the eyes the new debug view, a whole new world appears:

Unfortunately, the change doesn’t effect all objects - for example, the Environment object still appears as <Object>, as do (Ironically) some .Net controls and forms. However, even if the new capabilities are only available for a handful of objects, they present a huge advantage over the previous capabilities.
Do I really need to install VS2008 for this to work?
Update: User KJ update that the target pdm.dll (9.0.30729.1) is shipped free with Internet Explorer 8 ( he reports according to RC1 ).
regsvr32 "C:\Program Files\Internet Explorer\pdm.dll"
So, no need to install any Visual Studios 2008.
Thanks KJ!
You may need to restart the machine, and presto! Upgraded debugging capabilities, without the tiresome routine of installing VS2008.
Posted in QTP Hacks


Yaron Assa




April 11th, 2008 at 12:03 am
Would you mind posting the file version for the new dll for those of us who don’t want to install VS?
thanks!
April 11th, 2008 at 4:31 am
I’m sorry, but due to Microsoft legal issues, we cannot redistribute the file…
April 11th, 2008 at 6:08 pm
No, I meant what is the version number on your copy of the file? I have one that says 8.0.50727.42, and I can find a version 7.something on the web, but I’d like to search the web for whatever version you have now. I installed the VB version of VS2008 Express on a machine and can’t find a newer copy of that file, so I hope I can find it on the web…
Thanks!
April 14th, 2008 at 3:56 pm
it should be PDM.DLL version 9
April 21st, 2008 at 2:59 am
I download the PDM.dll only and created folder VS7DEBUG
under Microsoftshared folder .then registered the same but getting error load library. Is it mandatory
to have a Visual studio installation. Please clarify.
April 21st, 2008 at 8:53 am
I’ve had no such problems, and I’ve installed the DLL on 4 separate computers till now (only 1 of them had VS2008).
Are you sure your version is 9+?
When error are you getting, precisely?
April 22nd, 2008 at 1:05 pm
It’s a pity that it doesn’t improve debugging .Net-objects. It’s so annoying to guess or look up the members of an object. Maybe there will be a way in future.
April 22nd, 2008 at 1:06 pm
I had to replace the pdm.dll in C:\Windows\System32 and use regsvr32 on it to get it working.
April 25th, 2008 at 5:56 pm
I tried this but could not located the PDM.dll. Please could you tell me where this dll would be located after installing VS2008.
Thanks
May 12th, 2008 at 8:13 am
Hi. Where I can get the pdm.dll version 9+? I see the versions up to 7.x only.
May 16th, 2008 at 5:39 am
Hi ,Did any one find on free downloadable of PDM.ll version 9 ?
June 6th, 2008 at 7:31 pm
Was anybody able to get hold of this dll?
September 4th, 2008 at 12:41 pm
[…] test-objects, hoping to find some undocumented methods and techniques. Armed with the power of PDM.DLL, I’ve explored each test object, and have come up with these interesting results, all of which […]
September 7th, 2008 at 12:28 pm
Of the Express editions you need to install Visual Web Developer. I tried VB and C# versions without success - I think they use a separate dll called msdbg2.dll.
December 1st, 2008 at 10:05 pm
Hi there, ho there happy QTP’ers!
So how do you get the pdm.dll? Well, if you work in an office with a development team, chances are that they develop in the latest Visual Stedio.
Just ask them to do a search for ‘pdm.dll’ and have them copy the file to a flash drive or other medium and then you have the file.
Now you have the file!
December 1st, 2008 at 10:39 pm
I will say that it’s kind of ironic that the ‘was this article useful’ link did NOT work when selected…
I would have said that the article was and wasn’t useful. the dll doesn’t always register without errors where the article states the dll must be placed and says nothing about the dll in the system32 folder.
Oddly someone asked about that and the reply simply stated that they had no trouble. Not very illuminating.
Please revisit this article and state specifically where dlls need to be placed and exaclty the commandline command.
One thing I’d like to know is if you don’t have VS installed do you need the VS directory part?
December 1st, 2008 at 11:17 pm
I wonder if this is an issue with QTP v9.5
I had no problem with QTP v9.0
I even went so far as to install VS Express… no dice.
December 2nd, 2008 at 9:57 am
the article specifies exactly where to put the file
C:\Program Files\Common Files\Microsoft Shared\VS7DEBUG
by registering the file with RegSvr32you don’t need to place it under system32
December 4th, 2008 at 6:40 pm
FYI - “Visual Basic 2008 Express Edition” does NOT include version 9 of the PDM.DLL. Just installed it this morning and no luck. Still stuck at v 7 of that DLL. Must have to be the .NET express edition or one of the others.
December 5th, 2008 at 10:39 am
ALL - just like michael.entwistle, install Visual Web Developer. “Visual Basic 2008 Express Edition” does NOT include version 9.
December 17th, 2008 at 7:07 pm
[…] (both won’t be implemented). Luckily, there are workarounds for both these issues through the PDM hack (for debug intellisense), and WSC registration (for VBScript Class intellisense through […]
April 5th, 2009 at 11:35 am
Target pdm.dll (9.0.30729.1) is shipped free with Internet Explorer 8 ( I have RC1 ) -
regsvr32 “C:\Program Files\Internet Explorer\pdm.dll”
So, no need to install any Visual Studios 2008.
April 15th, 2009 at 8:33 pm
HELP!
RE: PDM.DLL
This worked wonderfully until we upgraded to QTP v9.5!
I loved the power of a upgraded debugger in QTP. Any assistance would be apreciated.
Please feel free to email me :)
Andrew.Marin@alaskaair.com
April 29th, 2009 at 12:25 am
I have qtp 10 - what do I need to do to get this upgraded debugger?
May 13th, 2009 at 9:38 am
Joe - QTP 10 has a problem which prevents using the PDM hack. You (and I) will have to wait for a patch.
June 16th, 2009 at 9:01 am
Great, I don’t need to install VS2003 or VS2005.Thanks for updating the article.
July 11th, 2009 at 6:15 pm
[…] robust as QTP 9.5 debugger. Many users have encountered a wide array of problems, from breaking the PDM.DLL hack, to disappearing complex values (occurs sometimes when working with external objects in the […]
October 29th, 2009 at 12:23 am
HELP!
RE: PDM.DLL
This worked wonderfully until we upgraded to QTP v9.5!
I loved the power of a upgraded debugger in QTP. Any assistance would be apreciated.
Please feel free to email me :)
andrew.marin@wellsfargo.com
January 6th, 2010 at 3:56 pm
To get improved debugging for QTP 10.0 you can install “Release Update” (QTP_00626)
http://learnqtponline.blogspot.com/2009/10/qtp-1000-release-update.html
…
QTP_00600 - Performance and Stability Fixes for the QuickTest Debug Viewer
…