<debug> Element
This topic is specific to a legacy technology that is retained for backward compatibility with existing applications and is not recommended for new development. Distributed applications should now be developed using the Windows Communication Foundation (WCF).
Specifies whether to load types in the configuration file when the application starts. This element cannot be specified when the configuration file is named web.config and the remote type host process is Internet Information Services (IIS). This element may occur in an application configuration file, machine configuration file.
Schema Hierarchy
<configuration>
<system.runtime.remoting> Element
<debug> Element
Syntax
<debug
loadTypes="true|false"
/>
Attributes and Elements
The following sections describe attributes, child elements, and parent elements.
Attributes
Attribute | Description |
---|---|
loadTypes |
Required attribute. Specifies whether to load all types specified in this configuration file when the application starts, so that you can be alerted if there is an error in your configuration file. This helps to prevent simple typing errors from becoming a time-consuming debugging effort. |
Child Elements
None.
Parent Elements
Element | Description |
---|---|
configuration |
The root element in every configuration file used by the common language runtime and .NET Framework applications. |
system.runtime.remoting |
Contains information about remote objects and channels. |
Example
The following configuration file example tells the .NET Framework remoting system to attempt to load the types specified in this file (in this case, the ServiceClass and TcpChannel types) when the client application starts.
<configuration>
<system.runtime.remoting>
<application>
<client>
<wellknown
type="ServiceClass, IService"
url="tcp://computername:8080/TcpService"
/>
</client>
<channels>
<channel ref="tcp"/>
</channels>
</application>
<debug loadTypes="true" />
</system.runtime.remoting>
</configuration>