<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Debugging on Bits and Pieces</title>
		<link>https://bits.strawjackal.org/tags/debugging/</link>
		<description>Recent content in Debugging on Bits and Pieces</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Wed, 30 Jan 2013 14:34:55 +0200</lastBuildDate>
		
			<atom:link href="https://bits.strawjackal.org/tags/debugging/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Attaching on Startup</title>
				<link>https://bits.strawjackal.org/70/</link>
				<pubDate>Wed, 30 Jan 2013 14:34:55 +0200</pubDate>
				<guid>https://bits.strawjackal.org/70/</guid>
				<description>&lt;p&gt;Here’s a neat trick I stumbled onto that can make life a lot easier – in our development workstations, certainly, and even in a pinch on staging and testing machines:&lt;/p&gt;&#xA;&lt;p&gt;How many times have you wished you could attach to a process immediately when it launchs? If we’re running a simple EXE, we can launch it from the debugger directly, but if we’re trying to debug a Windows Service, a scheduled task or a sub-process that is launched automatically, it isn’t that simple. We can try to press CTRL-ALT-P as quickly as possible, but that will almost always miss the very beginning. We can add a call to &lt;span style=&#34;font-family: Consolas;&#34;&gt;System.Diagnostics.Debugger.Launch()&lt;/span&gt; to our &lt;span style=&#34;font-family: Consolas;&#34;&gt;Application_Startup()&lt;/span&gt; function (or equivalent), but that’s polluting production code with debugging statements, and it isn’t really something we can send over to a staging or QA machine.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
