<?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>sebruiz.net &#187; debugging</title>
	<atom:link href="http://www.sebruiz.net/tag/debugging/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sebruiz.net</link>
	<description></description>
	<lastBuildDate>Thu, 09 Jul 2009 14:02:06 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Interactive Debugging KDE Apps with QtCreator</title>
		<link>http://www.sebruiz.net/359</link>
		<comments>http://www.sebruiz.net/359#comments</comments>
		<pubDate>Mon, 27 Apr 2009 14:54:39 +0000</pubDate>
		<dc:creator>Seb</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[amarok]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[gdb]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[qt]]></category>
		<category><![CDATA[qt creator]]></category>

		<guid isPermaLink="false">http://www.sebruiz.net/?p=359</guid>
		<description><![CDATA[Recently I began using QtCreator to try and do some development on Amarok. During my day job as a Java developer I get to work with tools like Intellij, which is a great IDE when you can put aside the problems of Java GUI apps on Linux.  For a long time I&#8217;ve been using [...]]]></description>
			<content:encoded><![CDATA[<a href="http://www.sebruiz.net/359" title="Interactive Debugging KDE Apps with QtCreator"><img src="http://www.sebruiz.net/wp-content/uploads/qc1-150x150.png" alt="" class="feed-image" /></a><p>Recently I began using <a href="http://www.qtsoftware.com/products/developer-tools">QtCreator</a> to try and do some development on Amarok. During my <a href="http://www.atlassian.com/">day job</a> as a Java developer I get to work with tools like Intellij, which is a great IDE when you can put aside the problems of Java GUI apps on Linux.  For a long time I&#8217;ve been using vim for my KDE development which has been more than sufficient, but lately I&#8217;m craving some of that productivity win that a fully fledged IDE can give.</p>
<p>Today I&#8217;ll show you how you can set up your KDE application in Qt Creator and use it&#8217;s interactive debugging to enhance your development speed. I&#8217;ll assume that you have an existing KDE project and you&#8217;re using Qt Creator 1.1, and I&#8217;m not going to do any whining about bugs and that rubbish.</p>
<p>Firstly, you&#8217;ll need to open a project. It&#8217;s as easy as <strong>File > Open</strong> and then find your <em>CMakeLists.txt</em> file. Your project should be parsed and opened. While we&#8217;re at it, let&#8217;s make sure that our compilation is optimised to use all of our computational power. Visit the <strong>Projects</strong> tab, select <em>Amarok</em> and under <em>Build Steps</em> add <em>-j5</em> (or similar) to the additional arguments input.</p>
<p><img src="http://www.sebruiz.net/wp-content/uploads/qc1.png" alt="QtCreator project" title="QtCreator project" width="294" height="332" class="aligncenter size-full wp-image-360" /></p>
<p>Now let&#8217;s get straight to the debugging. Back in the Projects tab, find the <strong>Run Settings</strong> panel and add <em>&#8211;nofork</em> as an argument. This tells the application to run without forking so we can attach to the process without worrying about magic foo computer stuff. I&#8217;d also recommend enabling the debugging helper which can be turned on in the settings window (under debugging).</p>
<p>Press F5 to start the debugging the application. Either before or during, or after the application has started up, set breakpoints in the application by clicking on a margin in a source file. You&#8217;ll see a little red icon display.</p>
<p><img src="http://www.sebruiz.net/wp-content/uploads/qc2.png" alt="Debugging" title="Debugging" width="906" height="653" class="aligncenter size-full wp-image-361" /></p>
<p>When you hit a breakpoint, the application will stop as it waits for the debugger. Here&#8217;s where using the interactive debugger wins over using gdb directly. You can easily see objects in the stack and navigate between callers. You can easily switch between thread dumps, and view local variables. You can set watches and not have to worry about remembering all the fiddly commands and what you are and aren&#8217;t watching. Stepping over and into functions is a breeze with the keyboard shortcuts (F10 and F11 to step over and into respectively).</p>
<p>This quick guide should hopefully be applicable to any KDE app, not just Amarok. I&#8217;ll let you discover the intricacies of using gdb as a debugging tool from within the IDE.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebruiz.net/359/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>A Use for NVidia</title>
		<link>http://www.sebruiz.net/340</link>
		<comments>http://www.sebruiz.net/340#comments</comments>
		<pubDate>Mon, 21 Jul 2008 08:14:04 +0000</pubDate>
		<dc:creator>Seb</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[humour]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[nvidia]]></category>

		<guid isPermaLink="false">http://www.sebruiz.net/?p=340</guid>
		<description><![CDATA[The world has seen a significant amount of complaining about NVidia cards (the 8600 has had it&#8217;s fair share of whippings).
However, I&#8217;ve come to a great realisation:
with my exceptionally slow nvidia card I can see absolutely every draw that occurs on the screen. Great for debugging paint events, and no need to export QT_FLUSH_PAINT=1.
All you [...]]]></description>
			<content:encoded><![CDATA[<p>The world has seen a significant amount of complaining about NVidia cards (the 8600 has had it&#8217;s fair share of whippings).</p>
<p>However, I&#8217;ve come to a great realisation:</p>
<blockquote><p>with my exceptionally slow nvidia card I can see absolutely every draw that occurs on the screen. Great for debugging paint events, and no need to export QT_FLUSH_PAINT=1.</p></blockquote>
<p>All you devs should go out and get one <img src='http://www.sebruiz.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.sebruiz.net/340/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
