<?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>The World Of Gavin &#187; debug</title>
	<atom:link href="http://www.gavinwillingham.com/tag/debug/feed" rel="self" type="application/rss+xml" />
	<link>http://www.gavinwillingham.com</link>
	<description>My opinions on things I have opinions on</description>
	<lastBuildDate>Fri, 28 Jan 2011 17:08:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Debugging across Eclipse workbenches</title>
		<link>http://www.gavinwillingham.com/debugging-was-in-eclipse-with-multiple-workbenches.html</link>
		<comments>http://www.gavinwillingham.com/debugging-was-in-eclipse-with-multiple-workbenches.html#comments</comments>
		<pubDate>Tue, 10 Nov 2009 16:45:20 +0000</pubDate>
		<dc:creator>gavin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[JEE]]></category>
		<category><![CDATA[WAS]]></category>

		<guid isPermaLink="false">http://www.gavinwillingham.com/?p=350</guid>
		<description><![CDATA[One annoying part of developing Eclipse plugins which generate deployable JEE applications is that the server you use for deployment is often set up and started through the runtime workbench. This means that to test your code, you need to configure the code lookup in your runtime workbench &#8211; a pain if you have multiple [...]]]></description>
			<content:encoded><![CDATA[<p>One annoying part of developing Eclipse plugins which generate deployable JEE applications is that the server you use for deployment is often set up and started through the runtime workbench.</p>
<p>This means that to test your code, you need to configure the code lookup in your runtime workbench &#8211; a pain if you have multiple runtime workbenches, or frequently clear your runtime workbench metadata.</p>
<p>An alternative approach, which I use, is to disconnect the debugger from the runtime workbench and connect it in your base workbench. This post details how.</p>
<p><span id="more-350"></span>The first step is to find out what port your server&#8217;s debug process is listening on. The default for WebSphere Application Server is 7777, but this might change if you&#8217;ve either customised it or configured multiple server instances. An easy way to check is to select the &#8220;debug&#8221; view in your Eclipse runtime workbench.</p>
<p style="text-align: center;">
<div id="attachment_354" class="wp-caption aligncenter" style="width: 472px"><a href="http://www.gavinwillingham.com/wp-content/uploads/2009/11/runtime_debug.jpg"><img class="size-full wp-image-354 " title="runtime_debug" src="http://www.gavinwillingham.com/wp-content/uploads/2009/11/runtime_debug.jpg" alt="Debug View" width="462" height="285" /></a><p class="wp-caption-text">Debug View</p></div>
<p>In this picture, you can see that my WAS instance is running on port 7778. Make a note of this number, then select (in this view) the server (either of the top 2 lines), and click the disconnect icon (the red &#8216;N&#8217; with 2 blobs icon). This disconnects the runtime workbench&#8217;s debugger from the server, freeing up the server&#8217;s debug port for another application i.e. your base workbench.</p>
<p style="text-align: center;">
<div id="attachment_356" class="wp-caption aligncenter" style="width: 232px"><a href="http://www.gavinwillingham.com/wp-content/uploads/2009/11/new_runtime_configuration.jpg"><img class="size-full wp-image-356 " title="new_runtime_configuration" src="http://www.gavinwillingham.com/wp-content/uploads/2009/11/new_runtime_configuration.jpg" alt="New config" width="222" height="245" /></a><p class="wp-caption-text">New config</p></div>
<p>Next, we need to create a runtime configuration in the base workbench to connect to the server. Open the debug configurations dialog (Run-&gt;Debug Configurations), and select &#8220;Remote Java Application&#8221;, then click the new button. All you really need to change from the default settings are the name (if you want to be able to remember it) and the port (to the port you wrote down earlier). Here&#8217;s mine:</p>
<div id="attachment_358" class="wp-caption aligncenter" style="width: 236px"><a href="http://www.gavinwillingham.com/wp-content/uploads/2009/11/runtime_config_settings.jpg"><img class="size-full wp-image-358" title="runtime_config_settings" src="http://www.gavinwillingham.com/wp-content/uploads/2009/11/runtime_config_settings.jpg" alt="Settings" width="226" height="260" /></a><p class="wp-caption-text">Settings</p></div>
<p>Finally, hit debug and away you go.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gavinwillingham.com/debugging-was-in-eclipse-with-multiple-workbenches.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

