Login   /   Register

VS2008 & PDM.DLL dramatically improves QTP’s debug engine

Rate this article
     3 votes, average: 4.67 out of 53 votes, average: 4.67 out of 53 votes, average: 4.67 out of 53 votes, average: 4.67 out of 53 votes, average: 4.67 out of 5
Loading ... Loading ...
March 30th, 2008 by Yaron Assa

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

29 Responses to “VS2008 & PDM.DLL dramatically improves QTP’s debug engine”

  1. jorsbern Says:

    [-]

    Would you mind posting the file version for the new dll for those of us who don’t want to install VS?

    thanks!

  2. Yaron Assa Says:

    [-]

    I’m sorry, but due to Microsoft legal issues, we cannot redistribute the file…

  3. jorsbern Says:

    [+]

    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.so... ...

  4. daniva Says:

    [-]

    it should be PDM.DLL version 9

  5. girish78 Says:

    [+]

    I download the PDM.dll only and created folder VS7DEBUG under Microsoftshared folder .then registered the same but getting error... ...

  6. Yaron Assa Says:

    [+]

    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 ... ...

  7. maxsch Says:

    [+]

    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 t... ...

  8. maxsch Says:

    [-]

    I had to replace the pdm.dll in C:\Windows\System32 and use regsvr32 on it to get it working.

  9. mgicqtp Says:

    [+]

    I tried this but could not located the PDM.dll. Please could you tell me where this dll would be located after installing VS2008. ... ...

  10. eduardge Says:

    [-]

    Hi. Where I can get the pdm.dll version 9+? I see the versions up to 7.x only.

  11. girish78 Says:

    [-]

    Hi ,Did any one find on free downloadable of PDM.ll version 9 ?

  12. mgicqtp Says:

    [-]

    Was anybody able to get hold of this dll?

  13. Secret Methods of QTP Objects | AdvancedQTP Says:

    [+]

    [...] test-objects, hoping to find some undocumented methods and techniques. Armed with the power of PDM.DLL, I’ve explored each... ...

  14. michael.entwistle Says:

    [+]

    Of the Express editions you need to install Visual Web Developer. I tried VB and C# versions without success - I think they use a ... ...

  15. andrewdmarin Says:

    [+]

    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, chance... ...

  16. andrewdmarin Says:

    [+]

    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 tha... ...

  17. andrewdmarin Says:

    [+]

    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 di... ...

  18. daniva Says:

    [+]

    the article specifies exactly where to put the file C:\Program Files\Common Files\Microsoft Shared\VS7DEBUG by registerin... ...

  19. aviationfan Says:

    [+]

    FYI - "Visual Basic 2008 Express Edition" does NOT include version 9 of the PDM.DLL. Just installed it this morning and no luck. ... ...

  20. maeri Says:

    [+]

    ALL - just like michael.entwistle, install Visual Web Developer. “Visual Basic 2008 Express Edition” does NOT include version ... ...

  21. QTP 10 Live Demonstration Breakdown | AdvancedQTP Says:

    [+]

    [...] (both won’t be implemented). Luckily, there are workarounds for both these issues through the PDM hack (for debug intellis... ...

  22. kj Says:

    [+]

    Target pdm.dll (9.0.30729.1) is shipped free with Internet Explorer 8 ( I have RC1 ) - regsvr32 "C:\Program Files\Internet Explor... ...

  23. andrewdmarin Says:

    [+]

    HELP! RE: PDM.DLL This worked wonderfully until we upgraded to QTP v9.5! I loved the power of a upgraded debugger in QTP.... ...

  24. jloyzaga Says:

    [-]

    I have qtp 10 - what do I need to do to get this upgraded debugger?

  25. Yaron Assa Says:

    [-]

    Joe - QTP 10 has a problem which prevents using the PDM hack. You (and I) will have to wait for a patch.

  26. heqingbluesky Says:

    [-]

    Great, I don’t need to install VS2003 or VS2005.Thanks for updating the article.

  27. HP to release a patch for QTP 10 debugger | AdvancedQTP Says:

    [+]

    [...] robust as QTP 9.5 debugger. Many users have encountered a wide array of problems, from breaking the PDM.DLL hack, to disappe... ...

  28. andrew.marin Says:

    [+]

    HELP! RE: PDM.DLL This worked wonderfully until we upgraded to QTP v9.5! I loved the power of a upgraded debugger in QTP.... ...

  29. yuriy_k Says:

    [+]

    To get improved debugging for QTP 10.0 you can install "Release Update" (QTP_00626) http://learnqtponline.blogspot.com/2009/10/... ...

Leave a Reply

You must be logged in to post a comment.

This article was viewed 4040 times