Click here to Skip to main content
13,050,840 members (64,955 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 23 Jul 2010

How Dynamic Language Runtime(DLR) feature in .NET Framework 4 is a boon for debugging COM objects

, 23 Jul 2010
Rate this:
Please Sign up or sign in to vote.
The dynamic language runtime (DLR) is a new runtime environment that adds a set of services for dynamic languages to the CLR.

The dynamic language runtime (DLR) is a new runtime environment that adds a set of services for dynamic languages to the CLR. For more details regarding new features of .NET Framework 4 please read New C# Features in the .NET Framework 4 and What's New in the .NET Framework 4

In this blog I’ll show how this feature can make life easy while developing/debugging COM applications and compare the same COM application running in frameworks prior to .NET Framework 4.

I’ll compare how easy it is to debug a Word Addin in .NET Framework 4 than frameworks prior to it e.g. .NET Framework 3.5.

As displayed below I’ve the screenshot from VS 2008(.NET Framework 3.5) Quickwatch window


I want to visualize the items of this collection so when I try to get the item at index 1 of COM object (ComAddIns in this example) .NET runtime throws exception as displayed below


In VS 2010(.NET Framework 4) Quckwatch window as highlighted in Red there is now a Dynamic View that displays members of the COM object I am debugging


When the Watch window displays an object that implements the IDynamicMetaObjectProvider. interface, the debugger adds a special Dynamic View node to the watch display. The Dynamic View node shows members of the dynamic object but does not allow editing of the member values. For more information please read Dynamic View

Now I can view the item(ComAddin in this example) at index 1 of COMAddins object in .NET Framework 4 because of DLR as displayed below



This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Software Developer (Senior)
India India
Atul works at Microsoft as a .NET consultant. As a consultant his job is to design, develop and deploy enterprise level secure and scalable solutions using Microsoft Technologies.

His technical expertise include .NET Framework(4.0, 3.5, 3.0), WPF, WCF, SharePoint 2010,, AJAX, Web Services, Enterprise Applications, SQL Server 2008, Open Xml, MS Word Automation.

Follow him on twitter @verma_atul

He blogs at

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 24 Jul 2010
Article Copyright 2010 by atverma
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid