<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Erix Blog &#187; Code</title>
	<atom:link href="http://ericburdo.com/blog/category/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://ericburdo.com/blog</link>
	<description>All Things Geekery - A blog by Eric</description>
	<lastBuildDate>Mon, 24 Jan 2011 22:26:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Are you running in the IDE?</title>
		<link>http://ericburdo.com/blog/code/36/are-you-running-in-the-ide/</link>
		<comments>http://ericburdo.com/blog/code/36/are-you-running-in-the-ide/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 21:48:39 +0000</pubDate>
		<dc:creator>Eric D. Burdo</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://blog.rlisolutions.com/code/36/are-you-running-in-the-ide/</guid>
		<description><![CDATA[Two methods, one for .NET (Visual Basic, but easily adjusted for C#) and the other for VB Classic (VB 5 and 6) To check and see if the .NET code is running from the IDE: More specifically, the .NET method checks to see if there is a debugger attached.&#160; It is possible to attach a [...]
No related posts.]]></description>
			<content:encoded><![CDATA[<p>Two methods, one for .NET (Visual Basic, but easily adjusted for C#) and the other for VB Classic (VB 5 and 6)</p>
<p>To check and see if the .NET code is running from the IDE: </p>
<p><em>More specifically, the .NET method checks to see if there is a debugger attached.&#160; It is possible to attach a debugger to a compiled exe, so this would return True.</em></p>
<blockquote><p>&lt;code&gt;      <br />&#160; If System.Diagnostics.Debugger.IsAttached Then       <br />&#160;&#160;&#160; &#8216;This is a way to see if we are running in the IDE.&#160; </p>
<p>&#160; End If      <br />&lt;/code&gt; </p>
</blockquote>
<p>And, if you&#8217;re using VB Classic, you can use this: </p>
<blockquote><p>&lt;code&gt;      <br />&#8216;Since Debug commands are compiled OUT, this will never return an error       <br />&#8216;when the code is compiled.       <br />Private Function IsDebugMode as Boolean       <br />&#160; On Error Resume Next       <br />&#160; Debug.Assert 1/0       <br />&#160; IsDebugMode = (Err.Number &lt;&gt; 0)       <br />&#160; On Error Goto 0       <br />End Function       <br />&lt;/code&gt;</p>
</blockquote>
<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://ericburdo.com/blog/code/36/are-you-running-in-the-ide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

