<?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>coders &#187; visual studio</title>
	<atom:link href="http://www.gehacktes.net/category/programming/visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gehacktes.net</link>
	<description>The Limits of My Language Mean the Limits of My World - Ludwig Wittgenstein</description>
	<lastBuildDate>Sat, 31 Jul 2010 12:33:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Tip: how not to step into code in visual studio</title>
		<link>http://www.gehacktes.net/2010/03/tip-how-not-to-step-into-code-in-visual-studio/</link>
		<comments>http://www.gehacktes.net/2010/03/tip-how-not-to-step-into-code-in-visual-studio/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 10:18:37 +0000</pubDate>
		<dc:creator>fschaper</dc:creator>
				<category><![CDATA[c++]]></category>
		<category><![CDATA[productivity improvement]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.gehacktes.net/?p=801</guid>
		<description><![CDATA[At my job, I heavily rely on working with the STL and the Boost libraries. During debugging, which as we all know takes up a certain amount of ones time, I found myself seemingly more often than not looking at STL or Boost code while stepping through. At some point I really got tired of [...]]]></description>
			<content:encoded><![CDATA[<p>At my job, I heavily rely on working with the STL and the Boost libraries.<br />
During debugging, which as we all know takes up a certain amount of ones time, I found myself seemingly more often than not looking at STL or Boost code while stepping through. </p>
<p>At some point I really got tired of hitting SHIFT+F11 to jump out of another section of code that I knew, wasn&#8217;t really the problem.</p>
<p>I found an interesting article about preventing the visual studio debugger from stepping into certain areas of your code, that I would like to share with you:<br />
<a href="http://blogs.msdn.com/andypennell/archive/2004/02/06/69004.aspx">http://blogs.msdn.com/andypennell/archive/2004/02/06/69004.aspx</a></p>
<p>Note that <b>in case you use a x64 based system</b> you will need to place the registry information into the HKLM\Software\Wow6432Node\Microsoft\VisualStudio\8.0\NativeDE entry (you can read more about this at <a href="http://support.microsoft.com/kb/896459">http://support.microsoft.com/kb/896459</a>).</p>
<p>So this is what I use on my Windows7 x64 installation running Visual Studio 2005:</p>

<div class="wp_syntax"><div class="code"><pre class="reg" style="font-family:monospace;"><span style="color: #0000FF;">Windows Registry Editor Version 5.00</span>
&nbsp;
<span style="color: #000000;">&#91;</span><span style="color: #800000;">HKEY_LOCAL_MACHINE</span>\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\8.0\NativeDE\StepOver<span style="color: #000000;">&#93;</span>
<span style="color: #0000FF;">&quot;no boost&quot;</span><span style="color: #000000;">=</span><span style="">&quot;boost\\:\\:.*=NoStepInto&quot;</span>
<span style="color: #0000FF;">&quot;no stl&quot;</span><span style="color: #000000;">=</span><span style="">&quot;std\\:\\:.*=NoStepInto&quot;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.gehacktes.net/2010/03/tip-how-not-to-step-into-code-in-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>calling functions from inside the watch window</title>
		<link>http://www.gehacktes.net/2009/08/calling-functions-from-inside-the-watch-window/</link>
		<comments>http://www.gehacktes.net/2009/08/calling-functions-from-inside-the-watch-window/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 01:53:59 +0000</pubDate>
		<dc:creator>fschaper</dc:creator>
				<category><![CDATA[productivity improvement]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.gehacktes.net/?p=503</guid>
		<description><![CDATA[It sometimes becomes handy to be able to call functions or methods while debugging. Say you have some complex type that you want to visualize on the console or to your debug output. The VisualStudio expression engine makes this an easy task (no need to brush up your assembler knowledge on this one) just enter [...]]]></description>
			<content:encoded><![CDATA[<p>It sometimes becomes handy to be able to call functions or methods while debugging. Say you have some complex type that you want to visualize on the console or to your debug output.</p>
<p>The VisualStudio expression engine makes this an easy task (no need to brush up your assembler knowledge on this one) just enter the function signature into your watch window. Note that you will need to fully qualify any namespaces.<br/></p>
<p>If your project consists of multiple modules, or when you use the same function signature in different compilation units you will have to tell the debugger where to find the symbol.<br />
For this the context operator <kbd>{[function],[source],[module] } location</kbd> is defined.<br />
You should have a look at the reference<a href="#ref_1" class="ref">[1]</a> over at MSDN to familiarize yourself with the syntax.</p>
<p><a name="ref_1">[1]</a> &#8211; The context operator &#8211; <a href="http://msdn.microsoft.com/en-us/library/wztycb7f%28VS.80%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/wztycb7f%28VS.80%29.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gehacktes.net/2009/08/calling-functions-from-inside-the-watch-window/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>visual studio breakpoint dependency hierarchy</title>
		<link>http://www.gehacktes.net/2009/06/visual-studio-breakpoint-dependency-hierarchy/</link>
		<comments>http://www.gehacktes.net/2009/06/visual-studio-breakpoint-dependency-hierarchy/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 16:27:28 +0000</pubDate>
		<dc:creator>fschaper</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.gehacktes.net/?p=402</guid>
		<description><![CDATA[A serious amount of time during software development is spent with debugging. Visual Studio makes the task of debugging native applications already a lot more comfortable but as with all things there is still room for improvement. One feature that I was missing of late was the concept of hierarchical breakpoints. Often during debugging I want [...]]]></description>
			<content:encoded><![CDATA[<p>A serious amount of time during software development is spent with debugging. Visual Studio makes the task of debugging native applications already a lot more comfortable but as with all things there is still room for improvement.</p>
<p>One feature that I was missing of late was the concept of <em>hierarchical breakpoints</em>.<br />
Often during debugging I want the debugger to break in some method or function but only coming from an specific path.</p>
<p>To give you an example:</p>

<div class="wp_syntax"><div class="code"><pre class="cpp" style="font-family:monospace;"><span style="color: #0000ff;">void</span> some_function<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
<span style="color: #ff0000; font-style: italic;">/* breakpoint here */</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">void</span> some_other_function<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">&#123;</span>
<span style="color: #ff0000; font-style: italic;">/* breakpoint here */</span>
    some_function<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">int</span> main<span style="color: #008000;">&#40;</span><span style="color: #0000ff;">int</span> argc, <span style="color: #0000ff;">char</span><span style="color: #000040;">*</span> argv<span style="color: #008000;">&#91;</span><span style="color: #008000;">&#93;</span><span style="color: #008000;">&#41;</span>
<span style="color: #008000;">&#123;</span>
    some_function<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    some_other_function<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008080;">;</span>
    <span style="color: #0000ff;">return</span> <span style="color: #0000dd;">0</span><span style="color: #008080;">;</span>
<span style="color: #008000;">&#125;</span></pre></div></div>

<p>What I&#8217;d like to do now is to break in &#8220;some_function&#8221; but only coming from &#8220;some_other_function&#8221;.<br />
In this easy example I could happily press F5 a couple of times and be done with it. I could also use the breakpoints hit-counter to accomplish that goal.<br />
But for more complex software this quickly becomes unpractical.</p>
<p>Luckily for me Visual Studio provides an rich extension framework.</p>
<p><a href="http://www.gehacktes.net/wp-content/uploads/2009/06/breakpoints.jpg"><img class="alignnone size-full wp-image-461" title="breakpoints" src="http://www.gehacktes.net/wp-content/uploads/2009/06/breakpoints.jpg" alt="breakpoints" width="631" height="793" /></a></p>
<p>You see two breakpoints in the image above. By Draging&#8217;n'Droping the breakpoint in line 7 on the one in line 11 the one in line 7 got disabled. Once the program hits line 11 during a debug run the AddIn will in turn enable all child breakpoints (the one in line 7 in this case).</p>
<h2>tutorial</h2>
<p>We have created a quick tutorial video <a href="http://www.gehacktes.net/bdh-tutorial/" target="_self">here</a>.</p>
<h2>download</h2>
<p>You can download the project (source only) from <a href="https://sourceforge.net/projects/bdh/" target="_blank">sourceforge</a>. Drop me a visit at <a href="https://www.ohloh.net/p/BDH" target="_blank">ohloh</a> if you like the software.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gehacktes.net/2009/06/visual-studio-breakpoint-dependency-hierarchy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: visual studio &#8216;build&#8217; output window &#8211; autoscroll</title>
		<link>http://www.gehacktes.net/2009/05/tip-visual-studio-build-output-window-autoscroll/</link>
		<comments>http://www.gehacktes.net/2009/05/tip-visual-studio-build-output-window-autoscroll/#comments</comments>
		<pubDate>Thu, 14 May 2009 10:24:38 +0000</pubDate>
		<dc:creator>fschaper</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.gehacktes.net/?p=395</guid>
		<description><![CDATA[once you manually browse in the &#8216;build&#8217; output window while running your compile you will have to manually navigate using the scrollbars to again see the most recent output from the compiler/linker. To re-enable the default auto-scroll functionality just press CTRL+END inside the output window.]]></description>
			<content:encoded><![CDATA[<p>once you manually browse in the &#8216;build&#8217; output window while running your compile you will have to manually navigate using the scrollbars to again see the most recent output from the compiler/linker. To re-enable the default auto-scroll functionality just press CTRL+END inside the output window.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gehacktes.net/2009/05/tip-visual-studio-build-output-window-autoscroll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>remove all comments from your source code</title>
		<link>http://www.gehacktes.net/2009/02/remove-all-comments-from-your-source-code/</link>
		<comments>http://www.gehacktes.net/2009/02/remove-all-comments-from-your-source-code/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 16:22:15 +0000</pubDate>
		<dc:creator>fschaper</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[strip comments]]></category>

		<guid isPermaLink="false">http://www.gehacktes.net/?p=321</guid>
		<description><![CDATA[while browsing the logs from this site I found that a lot of people are looking for a way to strip comments from their respective sources in visual studio. Well here would be the solution for C/C++ sources at least (in visual studio regular expression dialect). So just fire up your CTRL+H, search and replace [...]]]></description>
			<content:encoded><![CDATA[<p>while browsing the logs from this site I found that a lot of people are looking for a way to strip comments from their respective sources in visual studio.</p>
<p>Well here would be the solution for C/C++ sources at least (in visual studio regular expression dialect).</p>
<p><img class="alignnone size-full wp-image-322" title="replace_comments" src="http://www.gehacktes.net/wp-content/uploads/2009/02/replace_comments.jpg" alt="replace_comments" width="354" height="459" /></p>
<p>So just fire up your CTRL+H, search and replace dialog and strip away. Maybe you will find it wise to create a copy of your project beforehand in case I missed something.</p>
<p><img src="file:///C:/Users/fschaper/AppData/Local/Temp/1/moz-screenshot.jpg" alt="" /></p>
<pre>(/\*(\n|.)@\*/)|(//.*$)</pre>
<p>If you are interested in the visual studio specific dialect of regular expressions please have a look at this <a title="visual studio regex reference" href="http://msdn.microsoft.com/en-us/library/2k3te2cs(VS.80).aspx" target="_blank">msdn reference</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gehacktes.net/2009/02/remove-all-comments-from-your-source-code/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>automatic source formatting</title>
		<link>http://www.gehacktes.net/2009/02/automatic-source-formatting/</link>
		<comments>http://www.gehacktes.net/2009/02/automatic-source-formatting/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 15:40:02 +0000</pubDate>
		<dc:creator>fschaper</dc:creator>
				<category><![CDATA[productivity improvement]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.gehacktes.net/?p=318</guid>
		<description><![CDATA[like most larger companies, we have a set of coding guidelines that every developer working for us is bound to comply with. I don&#8217;t really care how the code is formatted in the end as long as it is consistent. But then again, it also helps to be the one defining the standard for your [...]]]></description>
			<content:encoded><![CDATA[<p>like most larger companies, we have a set of coding guidelines that every developer working for us is bound to comply with. I don&#8217;t really care how the code is formatted in the end as long as it is consistent. But then again, it also helps to be the one defining the standard for your co-workers to feel at ease with it.</p>
<p>On that note, I&#8217;d like to point you to an interesting link where you will find a <a title="coding standard generator" href="http://www.rosvall.ie/cgi-bin/genCodeStd.pl" target="_blank">coding standard generator</a>. After choosing from a lot of options your will end up with an generated document that can serve pretty well as a draft four your own needs.</p>
<p>To make compliance with that standard easier for me and my fellow co-workers, I have created an <a title="astyle" href="http://astyle.sourceforge.net/" target="_blank">astyle</a> configuration file and let astyle (A Free, Fast and Small Automatic     Formatter) run over my code every time I create a build (visual studio pre-build event). At least for my current project, the amount of time needed for the tool to crawl all my files does not become noticeable on my machine.</p>
<p>For sure astyle is no silver bullet. There where a couple of incidents where code wasn&#8217;t correctly formatted (at least not by our definition) and we would have to customize the tool a bit. Changing astyle to fit your needs however is pretty straight forward. What you gain however is that everybody is more or less free to code as he is used to. The result will always conform to the same standard since everybody&#8217;s code is formatted after a predefined set of rules.</p>
<p>At least for us this approach proved beneficial.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gehacktes.net/2009/02/automatic-source-formatting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>delete empty lines in visual studio</title>
		<link>http://www.gehacktes.net/2008/10/delete-empty-lines-in-visual-studio/</link>
		<comments>http://www.gehacktes.net/2008/10/delete-empty-lines-in-visual-studio/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 17:02:52 +0000</pubDate>
		<dc:creator>fschaper</dc:creator>
				<category><![CDATA[regular expressions]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.gehacktes.net/?p=14</guid>
		<description><![CDATA[programmers write a lot of text. better yet, they write structured text. that&#8217;s where regular expressions become handy. from time to time there are a lot of repetitive tasks, like deleting hundreds of empty lines out of an source file in VisualStudio 2005. To get rid of them all press CTRL+H (the default hotkey) to [...]]]></description>
			<content:encoded><![CDATA[<p>programmers write a lot of text. better yet, they write structured text. that&#8217;s where regular expressions become handy. from time to time there are a lot of repetitive tasks, like deleting hundreds of empty lines out of an source file in VisualStudio 2005.</p>
<p>To get rid of them all press <strong>CTRL+H</strong> (the default hotkey) to fire up the search+replace dialog. In the find options select Use: Regular expressions as the search method.  In the search textfield enter<strong> ^$\n</strong> and leave the replace with text field empty. Select the scope where search+replace should take place in the &#8220;Look in&#8221; drop down box. Now, fire away.</p>
<p><img class="alignnone size-full wp-image-179" title="search_replace" src="http://www.gehacktes.net/wp-content/uploads/2008/10/search_replace.jpg" alt="search_replace" width="354" height="459" /></p>
<p>As a short hint as to what the expression actually means:<br />
^ = match the beginning of an line<br />
$ = match the end of a line, but not the linefeed character<br />
\n = match the linefeed</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gehacktes.net/2008/10/delete-empty-lines-in-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
