<?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>Alteridem Consulting &#187; Development Tools</title>
	<atom:link href="http://www.alteridem.net/category/tools/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.alteridem.net</link>
	<description>Software by Design</description>
	<lastBuildDate>Fri, 02 Sep 2011 14:21:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Debugging Ruby on Windows using RubyMine</title>
		<link>http://www.alteridem.net/2011/01/05/debugging-ruby-on-windows-using-rubymine/</link>
		<comments>http://www.alteridem.net/2011/01/05/debugging-ruby-on-windows-using-rubymine/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 19:43:07 +0000</pubDate>
		<dc:creator>Robert Prouse</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[RubyMine]]></category>

		<guid isPermaLink="false">http://www.alteridem.net/2011/01/05/debugging-ruby-on-windows-using-rubymine/</guid>
		<description><![CDATA[Most of the installation instructions for the ruby debugger that I found were out of date for Windows, so I thought it would be useful to document how I got it working. First, you should start with Ruby installed from the RubyInstaller. If you have any problems with getting debugging working, I would suggest installing [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the installation instructions for the ruby debugger that I found were out of date for Windows, so I thought it would be useful to document how I got it working. </p>
<ol>
<li>First, you should start with Ruby installed from the <a href="http://rubyinstaller.org/downloads/">RubyInstaller</a>. If you have any problems with getting debugging working, I would suggest installing Ruby fresh from here and trying again. </li>
<li>Second, you need to install DevKit. Download DevKit from the <a href="http://rubyinstaller.org/downloads/">RubyInstaller</a> page, then follow the installation instructions on the <a href="https://github.com/oneclick/rubyinstaller/wiki/development-kit">Development Kit</a> page. Their instructions are thorough, so I won’t reproduce them here. The DevKit install has changed recently and this was part of my problem getting the debugging gem installed. </li>
<li>Install the <strong>ruby-debug-ide19</strong> gem with the following command line.
<pre class="code">gem install ruby-debug-ide19 –platform=ruby</pre>
</li>
<li>You should now be able to debug in <a href="http://www.jetbrains.com/ruby/">RubyMine</a>. When I started debugging in <a href="http://www.jetbrains.com/ruby/">RubyMine</a>, it prompted to install additional debugging gems. I allowed it and they installed fine and debugging started.
<p></li>
<ol type="a">
<li>Set a breakpoint by clicking in the gutter where you want the breakpoint
<p><img style="background-image: none; border-right-width: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="breakpoint" border="0" alt="breakpoint" src="http://www.alteridem.net/wp-content/uploads/2011/01/breakpoint.png" width="186" height="60" /> </li>
<li>Select your run/debug configuration in the toolbar and click on the <strong>Debug</strong> button
<p><img style="background-image: none; border-right-width: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="debug" border="0" alt="debug" src="http://www.alteridem.net/wp-content/uploads/2011/01/debug.png" width="240" height="67" /> </li>
<li>Visit the page you want to debug in your browser. You should hit the breakpoint and see the callstack and the values of all the variables in scope.
<p><a href="http://www.alteridem.net/wp-content/uploads/2011/01/watch.png"><img style="background-image: none; border-right-width: 0px; margin: 0px 0px 10px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="watch" border="0" alt="watch" src="http://www.alteridem.net/wp-content/uploads/2011/01/watch_thumb.png" width="644" height="204" /></a> </li>
<li>You should now be able to step through the code. See the <a href="http://www.jetbrains.com/ruby/webhelp/debugging.html">RubyMine debugging documentation</a> for more help. </li>
</ol>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.alteridem.net/2011/01/05/debugging-ruby-on-windows-using-rubymine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debugging PHP on Windows with NetBeans</title>
		<link>http://www.alteridem.net/2010/11/10/debugging-php-on-windows-with-netbeans/</link>
		<comments>http://www.alteridem.net/2010/11/10/debugging-php-on-windows-with-netbeans/#comments</comments>
		<pubDate>Wed, 10 Nov 2010 17:52:08 +0000</pubDate>
		<dc:creator>Robert Prouse</dc:creator>
				<category><![CDATA[NetBeans]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.alteridem.net/2010/11/10/debugging-php-on-windows-with-netbeans/</guid>
		<description><![CDATA[It seems that whenever I set up a new computer to debug PHP, I need to Google around to remind myself of the steps, so I thought I would document them here for reference. The following is for an XAMPP Apache/PHP install, but the basic steps are the same for any PHP install. Install and [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that whenever I set up a new computer to debug PHP, I need to Google around to remind myself of the steps, so I thought I would document them here for reference. The following is for an <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a> Apache/PHP install, but the basic steps are the same for any PHP install. </p>
<h3>Install and Configure Xdebug for PHP</h3>
<p>The first thing you need to do is get the <a href="http://xdebug.org/">Xdebug extension</a> for PHP installed and configured. Luckily, <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a> ships with <a href="http://xdebug.org/">Xdebug </a>and has the configuration already in php.ini, so you just need to make some minor changes and restart Apache. </p>
<ol>
<li>If you are also using <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a>, skip this step. If you are using an install of PHP without the Xdebug extension, go to the <a href="http://xdebug.org/find-binary.php">Xdebug Find Binary</a> page, paste in the output of phpinfo() or php –i and they will provide a link to the extension and custom installation instructions. </li>
<li>Open php.ini in your favourite editor. For <a href="http://www.apachefriends.org/en/xampp.html">XAMPP</a>, it is likely in C:\xampp\php. </li>
<li>Find and uncomment the extension.
<pre class="code">zend_extension = &quot;C:\xampp\php\ext\php_xdebug.dll&quot;</pre>
</li>
<li>Find the [XDebug] section and uncomment and/or edit the following values. Many of these are defaults, but I am listing them just in case you have different values.
<pre class="code">xdebug.profiler_enable = 1
xdebug.profiler_enable_trigger = 1
xdebug.remote_enable = 1
xdebug.remote_host = &quot;localhost&quot;
xdebug.remote_handler = &quot;dbgp&quot;
xdebug.remote_mode = &quot;req&quot;
xdebug.remote_port = 9000
xdebug.trace_output_dir = &quot;C:\xampp\tmp&quot;</pre>
</li>
<li>Restart Apache with the XAMPP control panel. </li>
<li>Bring up <a title="http://localhost/xampp/" href="http://localhost/xampp/">http://localhost/xampp/</a> and view phpinfo(). You should see Xdebug mentioned twice, once under the Zend engine and then as a PHP module.
<p><img style="background-image: none; border-right-width: 0px; margin: 10px auto 5px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="zend" border="0" alt="zend" src="http://www.alteridem.net/wp-content/uploads/2010/11/zend.png" width="608" height="88" /> </p>
<p><img style="background-image: none; border-right-width: 0px; margin: 5px auto 10px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="module" border="0" alt="module" src="http://www.alteridem.net/wp-content/uploads/2010/11/module.png" width="607" height="167" /> </li>
<li>You are done and ready to debug. </li>
</ol>
<h3>Debug with NetBeans</h3>
<p>What is not to love about <a href="http://netbeans.org">NetBeans</a>? You can use it for Java, PHP, Ruby, Html and C/C++. It integrates well with many bug tracking and source control systems. It provides IntelliSense, database management, works great with <a href="http://www.smarty.net/">Smarty templates</a> and allows you to debug your code. If you haven’t tried <a href="http://netbeans.org">NetBeans</a> yet, I highly recommend it.</p>
<ol>
<li>Start the IDE and load your PHP project. In the Project window, right click on your project and select <strong>Properties</strong>. Go to the <strong>Run Configuration</strong> node. You should be running as a Local Web Site. The Project URL should point to the root of your project directory and the Index File should be the file you want to launch into.<img style="background-image: none; border-right-width: 0px; margin: 5px auto 10px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="properties" border="0" alt="properties" src="http://www.alteridem.net/wp-content/uploads/2010/11/properties.png" width="623" height="348" /> </li>
<li>Right click again on your project. You can select <strong>Debug</strong> from here and get going right away, but if you first select <strong>Set as Main Project</strong>, you can just launch into the debugger with the <strong>Debug Main Project</strong> button on the toolbar or <strong>Ctrl+F5</strong>. (If <strong>Debug</strong> is not enabled, you probably need to enable the PHP plugin in NetBeans. Go to <strong>Tools | Plugins</strong>, click the <strong>Installed</strong> tab and make sure PHP is enabled.
<p><img style="background-image: none; border-right-width: 0px; margin: 5px auto 10px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="project" border="0" alt="project" src="http://www.alteridem.net/wp-content/uploads/2010/11/project.png" width="275" height="246" /> </li>
<li>When you start debugging, NetBeans will launch the browser to your start page. Notice how it appended the variable XDEBUG_SESSION_START=netbeans-xdebug to the end of the URL to start Apache debugging. If you see any Windows Firewall prompts at this point, accept them. </li>
<li>As the page loads, NetBeans will break on the first line of PHP code. The line will be highlighted and there will be a little green arrow in the margin to indicate the current line of execution.<br />
    <br /><img style="background-image: none; border-right-width: 0px; margin: 5px auto 10px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="debug1" border="0" alt="debug1" src="http://www.alteridem.net/wp-content/uploads/2010/11/debug1.png" width="381" height="104" /> </li>
<li>Congratulations, you are debugging. From here, you can set breakpoints by right clicking on the margin of your code and selecting <strong>Breakpoint | Toggle Line Breakpoint</strong>. You can step through code (<strong>F8</strong>) using the debug toolbar (if you don’t see it, right click on the toolbars and enable it.) You can inspect or even change variables and view the call stack.
<p><img style="background-image: none; border-right-width: 0px; margin: 5px auto 10px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="debug2" border="0" alt="debug2" src="http://www.alteridem.net/wp-content/uploads/2010/11/debug2.png" width="260" height="60" /> </li>
<li>If you are new to debugging code, read more about what you can do in the article on the NetBeans site,
<p><a href="http://netbeans.org/kb/docs/php/debugging.html">Debugging PHP Source Code in the NetBeans IDE</a>.</p>
</li>
</ol>
<p>If I missed anything or you have any other suggestions, I would love to hear about it in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alteridem.net/2010/11/10/debugging-php-on-windows-with-netbeans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio 2010 Command Prompt Here</title>
		<link>http://www.alteridem.net/2010/09/02/visual-studio-2010-command-prompt-here/</link>
		<comments>http://www.alteridem.net/2010/09/02/visual-studio-2010-command-prompt-here/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 17:52:37 +0000</pubDate>
		<dc:creator>Robert Prouse</dc:creator>
				<category><![CDATA[Tips'n'Tricks]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.alteridem.net/2010/09/02/visual-studio-2010-command-prompt-here/</guid>
		<description><![CDATA[Real developers live on the command line. Way back in 1996, Microsoft released the Command Prompt Here Power Toy to ease their pain. Industrious developers who preferred the Visual Studio command prompt took it and adopted it to run a Visual Studio command prompt with all of the paths to Visual Studio and .NET tools [...]]]></description>
			<content:encoded><![CDATA[<p><img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 6px 6px; display: inline; border-top: 0px; border-right: 0px" title="CmdPrompt" border="0" alt="CmdPrompt" align="right" src="http://www.alteridem.net/wp-content/uploads/2010/09/CmdPrompt.png" width="310" height="296" /> Real developers live on the command line. Way back in 1996, Microsoft released the <a href="http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx">Command Prompt Here Power Toy</a> to ease their pain. Industrious developers who preferred the Visual Studio command prompt took it and adopted it to run a Visual Studio command prompt with all of the paths to Visual Studio and .NET tools in the path.</p>
<p>In the fine, time honored tradition, I have continued to update with each new Visual Studio release and have finally done so for Visual Studio 2010.</p>
<p>To install, download, unzip and right click and install the INF file, it will add a “VS 2010 Cmd Prompt Here” menu item when you right click on a folder in Explorer. Clicking on the menu item will launch a DOS prompt in that directory with all of the Visual Studio and .NET paths set correctly.</p>
<ul>
<li><a href="http://www.alteridem.net/wp-content/uploads/2010/09/vsnet2010cmdhere_x86.zip">Visual Studio 2010 Command Prompt Here (x86)</a></li>
<li><a href="http://www.alteridem.net/wp-content/uploads/2010/09/vsnet2010cmdhere_x64.zip">Visual Studio 2010 Command Prompt Here (x64)</a></li>
</ul>
<p>This assumes that you have installed Visual Studio to the default directory on the C drive. If that is not the case, edit the INF file and change line 38 to the correct path for your installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alteridem.net/2010/09/02/visual-studio-2010-command-prompt-here/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Visual Studio Macro to switch between CPP and H files</title>
		<link>http://www.alteridem.net/2008/02/26/visual-studio-macro-to-switch-between-cpp-and-h-files/</link>
		<comments>http://www.alteridem.net/2008/02/26/visual-studio-macro-to-switch-between-cpp-and-h-files/#comments</comments>
		<pubDate>Tue, 26 Feb 2008 15:30:02 +0000</pubDate>
		<dc:creator>Robert Prouse</dc:creator>
				<category><![CDATA[Tips'n'Tricks]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.alteridem.net/2008/02/26/visual-studio-macro-to-switch-between-cpp-and-h-files/</guid>
		<description><![CDATA[I&#8217;ve been doing a lot of managed C++ programming lately and I had forgotten what a pain it is switching back and forth between the header file and source file.&#160; Back in the days of Visual Studio 6 I had a macro that switched between the CPP and H file, so I went googling, but [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing a lot of managed C++ programming lately and I had forgotten what a pain it is switching back and forth between the header file and source file.&nbsp; Back in the days of Visual Studio 6 I had a macro that switched between the CPP and H file, so I went googling, but the macro I <a href="http://www.codeguru.com/cpp/v-s/devstudio_macros/article.php/c3093/">found</a> didn&#8217;t work very well in VS2008.&nbsp; Like any good coder, I decided to write it myself instead.</p>
<p>If you haven&#8217;t written a macro before, here are the steps.</p>
<ol>
<li>In Visual Studio, go to <strong>Tools | Macros | Macros IDE</strong>. A new window should open and in the Project Explorer, the MyMacros project should be open.
<li>Right click on the <em>MyMacros</em> project and select <strong>Add | Add Module</strong>. Name it <em>CppUtilities</em>.&nbsp; The <em>CppUtilities</em> should open in the editor window.
<li>Add the code from below into the module and save the project.</li>
</ol>
<pre name="code" class="vb:nogutter">
‘=====================================================================
‘ If the currently open document is a CPP or an H file, attempts to
‘ switch between the CPP and the H file.
‘=====================================================================
Public Sub SwitchBetweenSourceAndHeader()
  Dim currentDocument As String
  Dim targetDocument As String

  currentDocument = ActiveDocument.FullName

  If currentDocument.EndsWith(“.cpp”, StringComparison.InvariantCultureIgnoreCase) Then
    targetDocument = Left(currentDocument, Len(currentDocument) - 3) + “h”
    OpenDocument(targetDocument)
  ElseIf currentDocument.EndsWith(“.h”, StringComparison.InvariantCultureIgnoreCase) Then
    targetDocument = Left(currentDocument, Len(currentDocument) - 1) + “cpp”
    OpenDocument(targetDocument)
  End If

End Sub

‘=====================================================================
‘ Given a document name, attempts to activate it if it is already open,
‘ otherwise attempts to open it.
‘=====================================================================
Private Sub OpenDocument(ByRef documentName As String)
  Dim document As EnvDTE.Document
  Dim activatedTarget As Boolean
  activatedTarget = False

  For Each document In Application.Documents
    If document.FullName = documentName And document.Windows.Count &gt; 0 Then
      document.Activate()
      activatedTarget = True
      Exit For
    End If
  Next
  If Not activatedTarget Then
    Application.Documents.Open(documentName, “Text”)
  End If
End Sub
</pre>
<p>If you switch back to Visual Studio and open the Macro Explorer, you should see the new module <em>CppUtilities</em> and the new macro <em>SwitchBetweenSourceAndHeader</em> in the tree.&nbsp; You could run the macro from here, but it is much easier to bind it to a keystroke.</p>
<ol>
<li>Click on <strong>Tools | Options</strong> then go to the <strong>Environment | Keyboard</strong> tab.</li>
<li>In the <strong>Show commands containing: </strong>box, type <em>CppUtilities.</em> This should filter the list down to one entry, <em>Macros.MyMacros.CppUtilitities.SwitchBetweenSourceAndHeader</em>.</li>
<li>Click on the <strong>Press shortcut keys:</strong> text box and then press the keystroke you would like to use to run the macro. If the keystroke is already used, it will show you below in the <strong>Shortcut currently used by:</strong> dropdown.&nbsp; When you find one that is unused, click the <strong>Assign</strong> button to use it.&nbsp; I use <strong>Ctrl+Shift+Alt+Bkspce</strong>.</li>
<li>Click <strong>OK</strong> then open a CPP or H file and give it a try.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.alteridem.net/2008/02/26/visual-studio-macro-to-switch-between-cpp-and-h-files/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Quickly Find/Open a File in Visual Studio</title>
		<link>http://www.alteridem.net/2007/09/11/quickly-findopen-a-file-in-visual-studio/</link>
		<comments>http://www.alteridem.net/2007/09/11/quickly-findopen-a-file-in-visual-studio/#comments</comments>
		<pubDate>Tue, 11 Sep 2007 20:02:57 +0000</pubDate>
		<dc:creator>Robert Prouse</dc:creator>
				<category><![CDATA[Tips'n'Tricks]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.alteridem.net/2007/09/11/quickly-findopen-a-file-in-visual-studio/</guid>
		<description><![CDATA[Here is a cool Visual Studio feature that almost nobody knows about. If you want to open up a file in your solution, but can&#8217;t be bothered to dig down through your projects and folders to find it, try this, Click in the Find box in the toolbar, Type &#62;of followed by a space, then [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a cool Visual Studio feature that almost nobody knows about. If you want to open up a file in your solution, but can&#8217;t be bothered to dig down through your projects and folders to find it, try this,</p>
<ol>
<li>Click in the Find box in the toolbar,
<li>Type &gt;of followed by a space, then begin the name of the file you are looking for.
<li>An auto-complete drop down will appear as you type filtering all the files in all your projects in your solution. Continue typing until the list is short enough to fine the one you want. Select it and hit enter.
<li>The file will open in the editor.</li>
</ol>
<div align="center"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="218" alt="openfile" src="http://www.alteridem.net/wp-content/uploads/2007/09/openfile.png" width="265" border="0"></div>
<p><b>Update:</b> After this post made the front page of <a href="http://www.dotnetkicks.com/">DotNetKicks</a>, Aaron Lerch wrote a <a href="http://www.aaronlerch.com/blog/2007/09/11/the-talented-mr-editgotofindcombo/">great post</a> on his blog with more things that you can do with the find combo. One thing that is very useful is that with the <strong>></strong>, you can issue any command, the alias <strong>>of</strong> mentioned here is just one of many. For a list of the commands, check out <a href="http://msdn2.microsoft.com/en-us/library/c3a0kd3x(VS.80).aspx">this MSDN page</a>.</p>
<p>Another useful tip is that <strong>Ctrl+D</strong> or <strong>Ctrl+/</strong> will automatically jump to the find box, so your hands don&#8217;t even need to leave your keyboard.</p>
<p><b>Update:</b> This trick was also mentioned on Just Sayin More Words as a part of his <a href="http://john-sheehan.com/blog/index.php/stupid-visual-studio-trick-part-3/">Stupid Visual Studio Trick</a> series. Thanks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.alteridem.net/2007/09/11/quickly-findopen-a-file-in-visual-studio/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

