<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Habib Heydarian's Blog @ Microsoft</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/habibh/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/habibh/feed.xml</link>
    <description>Program Manager for Microsoft Robotics, Visual Studio</description>
    <lastBuildDate>Mon, 06 Apr 2015 14:53:49 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>How to create a bootable USB flash drive to install Windows 8 Developer Preview</title>
      <link>https://docs.microsoft.com/archive/blogs/habibh/how-to-create-a-bootable-usb-flash-drive-to-install-windows-8-developer-preview</link>
      <pubDate>Wed, 14 Sep 2011 02:10:00 GMT</pubDate>
      <dc:creator><![CDATA[Habib Heydarian [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/habibh/2011/09/14/how-to-create-a-bootable-usb-flash-drive-to-install-windows-8-developer-preview/</guid>
      <description><![CDATA[Like many folks, after watching the BUILD keynote this morning, I couldn't wait to get home and...]]></description>
      <content:encoded><![CDATA[<p>Like many folks, after watching the <a href="https://www.buildwindows.com/">BUILD</a> keynote this morning, I couldn't wait to get home and install Windows 8 Developer Preview on my laptop. The instructions for installing Windows 8 are simple enough. The only fly in the ointment is that installing Windows 8 requires a DVD to create an install package.</p>  <p>Of course, since I haven't used an optical drive in years, I didn't have a blank DVD and I didn't want to wait until the morning to buy some. But I did have a USB flash drive and so I decided to create a bootable USB flash drive to install Windows 8.</p>  <p>To create a bootable USB flash drive <em>the easy way</em>, you can download the <a href="https://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool">Windows 7 USB/DVD download tool</a> from the Microsoft Store. If you feel adventurous and are comfortable with command line tools, below are the step-by-step instructions for installing Windows 8 Developer Preview from a USB flash drive. But be warned, if you are not comfortable with command line tools, downloading the <strong>Windows 7 USB/DVD download tool</strong> is a much better option and will save you the effort of reading the remainder of this blog.</p>  <h1>Instructions (using the command line)</h1>  <p>At a high level, the steps are:</p>  <ol>   <li>Mount the Windows 8 Developer Preview ISO image on your computer </li>    <li>Format a USB flash drive </li>    <li>Copy the Windows 8 files onto the USB flash drive </li>    <li>Make the USB flash drive bootable </li>    <li>Install Windows 8 from the bootable flash drive </li> </ol>  <h2>&#160;</h2>  <h3>Step 1: Mount the Windows 8 Developer Preview ISO image on your computer</h3>  <p>The first step is to mount the ISO image on your computer. Since Windows 7 doesn’t have the capability to mount an ISO image, you’ll have to use a 3rd party tool.</p>  <ol>   <li>Download the <a href="https://msdn.microsoft.com/en-us/windows/apps/br229516">Windows Developer Preview ISO image</a> (choose one of the three available) </li>    <li>Using your favorite <a href="https://en.wikipedia.org/wiki/Comparison_of_ISO_image_software">ISO image software</a>, mount the ISO image on your computer </li> </ol>  <p>To check that the ISO image mounted successfully, you should be able to browse the Windows 8 files, as shown below.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/31/47/metablogapi/8156.windows8_files_screen_shot_6AF367EA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-47-metablogapi/8156.windows8_5F00_files_5F00_screen_5F00_shot_5F00_6AF367EA.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="windows8_files_screen_shot" border="0" alt="windows8_files_screen_shot" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/31/47/metablogapi/6428.windows8_files_screen_shot_thumb_7714E211.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-47-metablogapi/6428.windows8_5F00_files_5F00_screen_5F00_shot_5F00_thumb_5F00_7714E211.png" width="554" height="391" /></a></p>  <h3>Step 2: Format a USB flash drive</h3>  <p>In case you’re wondering how big of a USB flash drive you need, an 8GB drive is perfect since it can accommodate any of the three available ISO images. Here are the steps to format a USB flash drive.</p>  <ol>   <li>Insert a USB flash drive into your computer </li>    <li>Start a Command Prompt as an Administrator and type <strong>diskpart</strong>. This starts the Disk Partition tool which you need to use to format the flash drive. Once you see the DISKPART command prompt, type in the following commands </li>    <li><strong>DISKPART&gt;</strong> list disk&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #008040" color="#008040">/* shows list of active disks */</span> </li>    <li><strong>DISKPART&gt;</strong> select disk #&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #008040" color="#008040">/* # is the number for your USB flash drive */</span> </li>    <li><strong>DISKPART&gt;</strong> clean&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #008040" color="#008040">/* deletes any existing partitions on the USB flash drive */</span> </li>    <li><strong>DISKPART&gt;</strong> create partition primary&#160;&#160;&#160;&#160; <span style="color: #008040" color="#008040">/* create a primary partition on the USB flash drive */</span> </li>    <li><strong>DISKPART&gt;</strong> select partition 1&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #008040" color="#008040">/* select the newly created partition */</span> </li>    <li><strong>DISKPART&gt;</strong> active&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #008040" color="#008040">/* make the new partition active */</span> </li>    <li><strong>DISKPART&gt;</strong> format FS=NTFS&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #008040" color="#008040">/* format the USB drive with NTFS file system */</span> </li>    <li><strong>DISKPART&gt;</strong> assign&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #008040" color="#008040">/* assign a volume and drive letter to the USB drive */</span> </li>    <li><strong>DISKPART&gt;</strong> exit&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #008040" color="#008040">/* exit Disk Partition */</span> </li> </ol>  <p>At this point, your USB flash drive should be showing up in Windows Explorer and have a drive letter assigned to it, e.g. F:\.</p>  <h3>Step 3: Make the USB flash drive bootable</h3>  <p>We just need to make the USB flash drive bootable before copying the files. To do this, you can use the <em>Boot Sector Registration Tool (bootsect.exe)</em> which is located in the <strong>boot</strong> folder of the Windows 8 ISO image.</p>  <ol>   <li>Start a Command Prompt as an Administrator and <strong>CHDIR</strong> into the <strong>boot</strong> folder of the Windows 8 ISO image, e.g. <strong>I:\boot</strong> where I<strong>:\</strong> is the drive where the ISO image is mounted </li>    <li>Type <strong>bootsect /nt60 E:</strong>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <span style="color: #008040" color="#008040">/* where E: is the drive assigned to the USB flash drive */ </span></li> </ol>  <p>You should see the following confirmation after bootsec.exe completes:</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/31/47/metablogapi/2112.bootsect_screen_shot_3D91D21A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-47-metablogapi/2112.bootsect_5F00_screen_5F00_shot_5F00_3D91D21A.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="bootsect_screen_shot" border="0" alt="bootsect_screen_shot" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/31/47/metablogapi/8156.bootsect_screen_shot_thumb_763C7C27.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-47-metablogapi/8156.bootsect_5F00_screen_5F00_shot_5F00_thumb_5F00_763C7C27.png" width="565" height="287" /></a></p>  <h3>Step 4: Copy the Windows 8 files onto the USB flash drive</h3>  <p>From a command line, use XCOPY to copy the Windows 8 files to the USB flash drive . In the example below, I<strong>:\</strong> is the drive where the ISO image is mounted. <strong>F:\</strong> is the USB flash drive.</p>  <p><strong>XCOPY I:\*.* F:\ /E /F /H</strong></p>  <h3>Step 5: Install Windows 8 from the bootable flash drive</h3>  <p>Finally, follow these instructions to install Windows 8 on your computer.</p>  <ol>   <li>Remove your USB flash drive from your &quot;source&quot; computer and insert it into the &quot;target&quot; computer where you want to install Windows 8 </li>    <li>On the computer where you are installing Windows 8, press the power button to turn on the computer </li>    <li>During boot up, select the USB flash drive to boot from (if you don't see the USB flash drive as an option, you may have to adjust your BIOS settings) </li>    <li>Follow the instructions to install Windows 8 Developer Preview </li> </ol>  <p>Here is a screen shot from the boot manager on my computer showing the USB flash drive as an option.</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/31/47/metablogapi/6428.boot_manager_screen_shot_0ECC1978.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-47-metablogapi/6428.boot_5F00_manager_5F00_screen_5F00_shot_5F00_0ECC1978.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="boot_manager_screen_shot" border="0" alt="boot_manager_screen_shot" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/31/47/metablogapi/8562.boot_manager_screen_shot_thumb_7AD286E1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-47-metablogapi/8562.boot_5F00_manager_5F00_screen_5F00_shot_5F00_thumb_5F00_7AD286E1.png" width="563" height="377" /></a></p>  <p>I installed Windows 8 Developer Preview on a vanilla Dell Inspiron 15R laptop which unfortunately doesn't have touch (or any other sensors for that matter).</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/31/47/metablogapi/4857.windows8_on_dell_screen_shot_4BA09B4A.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-47-metablogapi/4857.windows8_5F00_on_5F00_dell_5F00_screen_5F00_shot_5F00_4BA09B4A.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="windows8_on_dell_screen_shot" border="0" alt="windows8_on_dell_screen_shot" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/31/47/metablogapi/7506.windows8_on_dell_screen_shot_thumb_38133BA9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-47-metablogapi/7506.windows8_5F00_on_5F00_dell_5F00_screen_5F00_shot_5F00_thumb_5F00_38133BA9.png" width="644" height="431" /></a></p>  <p>The personalization steps in Windows 8 Developer Preview are really quick.</p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/31/47/metablogapi/4760.windows8_personalize_screen_shot_41F82D14.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-47-metablogapi/4760.windows8_5F00_personalize_5F00_screen_5F00_shot_5F00_41F82D14.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="windows8_personalize_screen_shot" border="0" alt="windows8_personalize_screen_shot" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/31/47/metablogapi/8176.windows8_personalize_screen_shot_thumb_75C02365.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-47-metablogapi/8176.windows8_5F00_personalize_5F00_screen_5F00_shot_5F00_thumb_5F00_75C02365.png" width="644" height="431" /></a></p>  <p>And here is the final screenshot of my shiny new Windows 8 installation!</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/31/47/metablogapi/0640.windows8_start_menu_screen_shot_0D0B27D7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-47-metablogapi/0640.windows8_5F00_start_5F00_menu_5F00_screen_5F00_shot_5F00_0D0B27D7.png"><img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="windows8_start_menu_screen_shot" border="0" alt="windows8_start_menu_screen_shot" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/31/47/metablogapi/6013.windows8_start_menu_screen_shot_thumb_4BFCA872.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-31-47-metablogapi/6013.windows8_5F00_start_5F00_menu_5F00_screen_5F00_shot_5F00_thumb_5F00_4BFCA872.png" width="644" height="431" /></a></p>  <p>   <br />Habib Heydarian.</p>]]></content:encoded>
    </item>
    <item>
      <title>One bug, two developers: Collaborative debugging is now a reality in Visual Studio 2010</title>
      <link>https://docs.microsoft.com/archive/blogs/habibh/one-bug-two-developers-collaborative-debugging-is-now-a-reality-in-visual-studio-2010</link>
      <pubDate>Tue, 01 Dec 2009 16:51:08 GMT</pubDate>
      <dc:creator><![CDATA[Habib Heydarian [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/habibh/2009/12/01/one-bug-two-developers-collaborative-debugging-is-now-a-reality-in-visual-studio-2010/</guid>
      <description><![CDATA[Quite often, one or more developers need to collaborate on a bug to figure out the root cause of the...]]></description>
      <content:encoded><![CDATA[<p>Quite often, one or more developers need to collaborate on a bug to figure out the root cause of the problem. This collaboration is typically done using tools like email, bug tracking system (e.g. TFS) or if the developers are collocated, they might work on the bug together in one of their offices. Here is what the typical workflow looks like:</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Collaborting on a bug" border="0" alt="Collaborting on a bug" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_27.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_27.png" width="846" height="472" />&#160;</p>  <p>In the workflow above, when <em>Developer 1</em> hands the bug over to <em>Developer 2</em>, there is a lot of context and information that is left out and what usually happens is that Developer 2 restarts debugging the same issue to figure out the root cause. Basically, Developer 2 ends up doing a lot of redundant work that Developer 1 has already done. Ideally, Developer 2 should be able to leverage the investigation work that was done by Developer 1 and just continue the debugging session.</p>  <p>In Visual Studio 2010, using two new features , i.e. <em>Breakpoint Import/Export</em> and <em>DataTips Import/Export</em> allows Developer 1 to hand off the debugging session to Developer 2 so that Developer 2 can just pick up where Developer 1 left off.</p>  <p>Let's go through an example to see how this collaboration works. In this example, Developer 1 is investigating a bug in the <strong>Tailspin Toys</strong> e-commerce sample application. He is trying to figure out why the Shopping Cart isn't updated when the user adds the same toy to the cart. After debugging the problem in Visual Studio, Developer 1 discovers that the bug is in a method (AdjustQuantity) that is in a component (Tailspin.Model) owned by Developer 2. The screenshot below shows where Developer 1 thinks the bug is.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="AdjustQuantity bug" border="0" alt="AdjustQuantity bug" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_6.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_6.png" width="790" height="532" /> </p>  <p>At this point, Developer 1 wants to give this bug to Developer 2. However, rather than have Developer 2 do all the work to reproduce the bug, Developer 1 captures a couple of crucial pieces of information and sends them along with the bug to Developer 2. In a sense, Developer shares his debugging environment with Developer 2. First, Developer 1 exports his current breakpoint by right-clicking on the breakpoint in the editor and selecting the &quot;Export…&quot; command, as shown below. By exporting the breakpoint, Developer 2 can now easily figure out where to start investigating the bug.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Export Breakpoint context menu" border="0" alt="Export Breakpoint context menu" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_9.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_9.png" width="547" height="267" /> </p>  <p>The exported breakpoint file is shown below.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Exported Breakpoint File" border="0" alt="Exported Breakpoint File" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_12.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_12.png" width="800" height="390" /> </p>  <p>The next piece of information that Developer 1 wants to share with Developer 2 is what information Developer 2 should look at when debugging the problem. In order to do that, Developer 1 first &quot;pins&quot; the variable that he thinks is causing the bug to the editor, as shown below.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Variable pinned to the editor" border="0" alt="Variable pinned to the editor" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_15.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_15.png" width="790" height="532" /> </p>  <p>After pinning the variable to the editor, Developer 1 exports the pinned variable, by selecting the Debug –&gt; Export DataTips… command. The exported DataTips file is shown below.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Exported DataTips" border="0" alt="Exported DataTips" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_18.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_18.png" width="799" height="391" /> </p>  <p>Now, instead of Developer 2 restarting the investigation, he can continue where Developer 1 left off by importing the debugging environment. The new workflow is shown below.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Collaborative Debugging" border="0" alt="Collaborative Debugging" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_30.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_30.png" width="841" height="379" /> </p>  <p>To import the debugging environment, Developer 2 can import the DataTips file from Debug –&gt; Import DataTips. The exported breakpoints can be imported from the Breakpoints window, as shown below.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Import Breakpoints" border="0" alt="Import Breakpoints" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_33.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_33.png" width="576" height="240" /> </p>  <p>After importing both the breakpoint and the DataTips, Developer 2 can simply continue his investigation by pressing F5. The debugger will now stop at the breakpoint that Developer 1 exported and will show the variable as well. It will even show the comment that Developer 1 wanted to pass onto Developer 2. This is shown below.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Developer 2 Debugging View" border="0" alt="Developer 2 Debugging View" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_46.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/OnebugtwodevelopersVisualStudio2010justm_ED81/image_46.png" width="736" height="385" /> </p>  <p>If you have any feedback or suggestions on this feature or have any ideas on how to better collaborate when debugging, feel free to leave me a comment.</p>  <p>Habib Heydarian.</p>]]></content:encoded>
    </item>
    <item>
      <title>Search For This Line In IntelliTrace</title>
      <link>https://docs.microsoft.com/archive/blogs/habibh/search-for-this-line-in-intellitrace</link>
      <pubDate>Tue, 24 Nov 2009 17:42:08 GMT</pubDate>
      <dc:creator><![CDATA[Habib Heydarian [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/habibh/2009/11/24/search-for-this-line-in-intellitrace/</guid>
      <description><![CDATA[One of the key benefits of IntelliTrace is that it collects lots of useful information about your...]]></description>
      <content:encoded><![CDATA[<p>One of the key benefits of IntelliTrace is that it collects lots of useful information about your application which allows you to debug exactly what the application was doing when a problem occurred. With so much information, it's important to be able to search for the specific data that led to the bug in the program. IntelliTrace provides a couple of features inside the editor that allow you to narrow down your search:</p>  <ol>   <li>Search For This Line In IntelliTrace </li>    <li>Search For This Method In IntelliTrace </li> </ol>  <p>Both of these features are available from the editor context menu (shown below). In this blog post, I'm going to cover the first feature, i.e. <strong>Search For This Line In IntelliTrace</strong>. In a future blog, I'm going to cover the second feature, i.e. <strong>Search For This Method In IntelliTrace</strong>.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Editor Context Menu" border="0" alt="Editor Context Menu" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/SearchForThisLineInIntelliTrace_B9C0/image_3.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/SearchForThisLineInIntelliTrace_B9C0/image_3.png" width="470" height="580" />&#160; </p>  <p>So what does the &quot;Search For This Line In IntelliTrace&quot; command do exactly and how is it used? Let's walkthrough a simple example to see how this feature works. In the following code snippet, I am interested in finding out <strong>how many times</strong> the the statement <font face="Courier New">ShoppingCartItem item = FindItem(product);</font> (line 7 below) was executed and also, I want to figure out what happened before this line was called.</p>  <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">   <div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">     <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum1">   1:</span> <span style="color: #008000">/// &lt;summary&gt;</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum2">   2:</span> <span style="color: #008000">/// Adds a product to the cart</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum3">   3:</span> <span style="color: #008000">/// &lt;/summary&gt;</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum4">   4:</span> <span style="color: #0000ff">public</span> <span style="color: #0000ff">void</span> AddItem(Product product, <span style="color: #0000ff">int</span> quantity, DateTime dateAdded) {</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum5">   5:</span>&#160; </pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum6">   6:</span>     <span style="color: #008000">//see if this item is in the cart already</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum7">   7:</span>     ShoppingCartItem item = FindItem(product);</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum8">   8:</span>&#160; </pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum9">   9:</span>     <span style="color: #0000ff">if</span> (quantity != 0) {</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum10">  10:</span>         <span style="color: #0000ff">if</span> (item != <span style="color: #0000ff">null</span>) {</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum11">  11:</span>             <span style="color: #008000">//if the passed in amount is 0, do nothing</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum12">  12:</span>             <span style="color: #008000">//as we're assuming &quot;add 0 of this item&quot; means</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum13">  13:</span>             <span style="color: #008000">//do nothing</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum14">  14:</span>             <span style="color: #0000ff">if</span> (quantity != 0)</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum15">  15:</span>                 AdjustQuantity(product, quantity);</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum16">  16:</span>         } <span style="color: #0000ff">else</span> {</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum17">  17:</span>             <span style="color: #0000ff">if</span> (quantity &gt; 0) {</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum18">  18:</span>                 item = <span style="color: #0000ff">new</span> ShoppingCartItem(product, quantity, dateAdded);</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum19">  19:</span>&#160; </pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum20">  20:</span>                 <span style="color: #008000">//add to list</span></pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum21">  21:</span>                 Items.Add(item);</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum22">  22:</span>             }</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum23">  23:</span>         }</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum24">  24:</span>&#160; </pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum25">  25:</span>     }</pre>
<!--CRLF-->

    <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px"><span style="color: #606060" id="lnum26">  26:</span> }</pre>
<!--CRLF--></div>
</div>

<p>In order to do that, I can right-click on line 7 above and select &quot;Search For This Line in IntelliTrace&quot;.</p>

<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Search For This Line In IntelliTrace" border="0" alt="Search For This Line In IntelliTrace" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/SearchForThisLineInIntelliTrace_B9C0/image_5.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/SearchForThisLineInIntelliTrace_B9C0/image_5.png" width="919" height="671" /> </p>

<p>After selecting the command, the IntelliTrace Search Bar is shown at the top of the editor window. The screenshot below highlights the IntelliTrace Search Bar.</p>

<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/SearchForThisLineInIntelliTrace_B9C0/image_7.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/SearchForThisLineInIntelliTrace_B9C0/image_7.png" width="754" height="566" /> </p>

<p>Think of the Search Bar as the controls on your DVR where you can go backwards and forwards through your IntelliTrace recording. One of the key features that the IntelliTrace Search Bar provides is displaying the number of times that a line of code was executed. In the example below, you can see that the highlighted line was executed 4 times.</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/SearchForThisLineInIntelliTrace_B9C0/image_9.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/SearchForThisLineInIntelliTrace_B9C0/image_9.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/SearchForThisLineInIntelliTrace_B9C0/image_thumb_1.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/SearchForThisLineInIntelliTrace_B9C0/image_thumb_1.png" width="754" height="566" /></a> </p>

<p>Using the Search Bar, you can debug backwards from the time when the line of code was executed. In the screenshot below, after clicking the left arrow once, I can now use IntelliTrace to step back through the code.</p>

<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Go to Previous event" border="0" alt="Go to Previous event" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/SearchForThisLineInIntelliTrace_B9C0/image_11.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/SearchForThisLineInIntelliTrace_B9C0/image_11.png" width="754" height="566" />&#160;</p>

<p>Habib Heydarian.</p>]]></content:encoded>
    </item>
    <item>
      <title>IntelliTrace: A graphical comparison</title>
      <link>https://docs.microsoft.com/archive/blogs/habibh/intellitrace-a-graphical-comparison</link>
      <pubDate>Fri, 20 Nov 2009 02:23:01 GMT</pubDate>
      <dc:creator><![CDATA[Habib Heydarian [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/habibh/2009/11/20/intellitrace-a-graphical-comparison/</guid>
      <description><![CDATA[One of the easiest ways to understand what IntelliTrace is and what it does, is through a comparison...]]></description>
      <content:encoded><![CDATA[<p>One of the easiest ways to understand what IntelliTrace is and what it does, is through a comparison between how most developers debug their application today vs. what IntelliTrace enables.</p>  <p>In the figure below, the blue section labeled (1) shows one of the most common ways that developers debug their applications today which is by writing code , e.g. Debug. WriteLine(&quot;Calling Web Service&quot;) to figure out what the application does.</p>  <p>This is often called &quot;explicit instrumentation&quot; because the developer explicitly adds code to the application to instrument its behavior. After the application runs, a <em>log file</em> is generated which is often just a plain text file that developers view using Notepad. This type of debugging is tedious and it can take a long time to investigate a bug.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="What is IntelliTrace" border="0" alt="What is IntelliTrace" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/IntelliTraceAgraphicaldepiction_1A93/image_9.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/IntelliTraceAgraphicaldepiction_1A93/image_9.png" width="480" height="360" /> </p>  <p></p>  <p></p>  <p></p>  <p>In comparison, IntelliTrace alleviates the need to write trace statements just to figure out what the application is doing. In the green section above labeled (2), the IntelliTrace Recorder automatically records what the application does and allows the developer to replay the recording at a later time. Specifically, IntelliTrace provides three capabilities:</p>  <ul>   <li>Record </li>    <li>Playback </li>    <li>Rewind </li> </ul>  <p>What's important to note is that IntelliTrace also provides a rich UI to analyze the application recording. No more wading through volumes of text in Notepad just to figure what the application was doing.</p>  <p>Habib Heydarian.</p>]]></content:encoded>
    </item>
    <item>
      <title>How to Count the Lines of Code (LOC) in your application using Visual Studio</title>
      <link>https://docs.microsoft.com/archive/blogs/habibh/how-to-count-the-lines-of-code-loc-in-your-application-using-visual-studio</link>
      <pubDate>Tue, 27 Oct 2009 18:30:46 GMT</pubDate>
      <dc:creator><![CDATA[Habib Heydarian [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/habibh/2009/10/27/how-to-count-the-lines-of-code-loc-in-your-application-using-visual-studio/</guid>
      <description><![CDATA[I was talking to someone the other day and he asked me whether Visual Studio has a tool to count the...]]></description>
      <content:encoded><![CDATA[<p>I was talking to someone the other day and he asked me whether Visual Studio has a tool to count the lines of code in an application. It occurred to me that others might be interested in the answer so I decided to blog about it.</p>  <p>There is a tool called Code Metrics in Visual Studio 2008 and 2010 that among other things, counts the lines of code in a project. Using Code Metrics is very simple. In Solution Explorer, select the project that you want to know the LOC for, right-click and select &quot;Calculate Code Metrics&quot;.</p>  <p>The screenshot below shows the Code Metrics window. One of the nice things about the Code Metrics window is that it shows you the lines of code per project, namespace, class or method.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/Howmany_D0FD/image_3.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/Howmany_D0FD/image_3.png" width="1053" height="356" /> </p>  <p>Habib Heydarian.</p>]]></content:encoded>
    </item>
    <item>
      <title>Looking for questions or feedback on IntelliTrace</title>
      <link>https://docs.microsoft.com/archive/blogs/habibh/looking-for-questions-or-feedback-on-intellitrace</link>
      <pubDate>Mon, 26 Oct 2009 22:23:05 GMT</pubDate>
      <dc:creator><![CDATA[Habib Heydarian [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/habibh/2009/10/26/looking-for-questions-or-feedback-on-intellitrace/</guid>
      <description><![CDATA[During the last few months, I've been blogging extensively about a new Visual Studio 2010 feature...]]></description>
      <content:encoded><![CDATA[<p>During the last few months, I've been blogging extensively about a new Visual Studio 2010 feature called IntelliTrace (formerly known as the "Historical Debugger"). We are very excited about IntelliTrace and think that it's going to change how people debug their applications.<p>Since IntelliTrace is a brand new feature, we are eager to hear from developers about what they think about it. So, here is my offer: If you have any questions or feedback (both positive and negative) about IntelliTrace, send me your feedback via this blog and I will reply with an answer within 24 hours. Regardless of weather you've used IntelliTrace extensively and have an "advanced" questions, or you've never used it before and just want to learn about it, I'll be happy to answer any questions related to IntelliTrace.</p><p>Thanks in advance.</p><p>Habib Heydarian.</p></p>
]]></content:encoded>
    </item>
    <item>
      <title>Using IntelliTrace to view the return value of a VB or C# method</title>
      <link>https://docs.microsoft.com/archive/blogs/habibh/using-intellitrace-to-view-the-return-value-of-a-vb-or-c-method</link>
      <pubDate>Fri, 23 Oct 2009 21:30:00 GMT</pubDate>
      <dc:creator><![CDATA[Habib Heydarian [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/habibh/2009/10/23/using-intellitrace-to-view-the-return-value-of-a-vb-or-c-method/</guid>
      <description><![CDATA[A few months ago, I blogged about how to view the return value of a C# or VB method in the Visual...]]></description>
      <content:encoded><![CDATA[<p>A few months ago, I <a href="https://blogs.msdn.com/habibh/archive/2009/06/10/how-to-view-the-return-value-of-a-c-or-vb-method-in-the-vs-debugger.aspx">blogged</a> about how to view the return value of a C# or VB method in the Visual Studio debugger. As I explained in that blog post, the debugger does not support viewing the return value of a .NET method, so you have to apply a workaround or two.</p>  <p>Being able to see the return value of a method comes in particularly handy when you have methods that take other methods as their parameters, e.g. F(A(x), B(y)), where A() and B() are methods themselves. For example, in the code example below, how can you see the value that is returned by c.CalculateArea(radius)?</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/UsingIntelliTracetoviewthereturnvalueofa_11CF7/image_5.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/UsingIntelliTracetoviewthereturnvalueofa_11CF7/image_5.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Return Value" border="0" alt="Return Value" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/UsingIntelliTracetoviewthereturnvalueofa_11CF7/image_thumb_1.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/UsingIntelliTracetoviewthereturnvalueofa_11CF7/image_thumb_1.png" width="1004" height="655" /></a> </p>  <p>IntelliTrace in Visual Studio 2010 makes it easy to view the return value of a method.</p>  <p>The first step is to change the default IntelliTrace options to record &quot;events and call information&quot;, as shown below.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IntelliTrace Options" border="0" alt="IntelliTrace Options" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/UsingIntelliTracetoviewthereturnvalueofa_11CF7/image_8.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/UsingIntelliTracetoviewthereturnvalueofa_11CF7/image_8.png" width="862" height="578" /> </p>  <p>After enabling the above option, IntelliTrace will record the return value and parameters of all methods in the running application. Now, whenever you stop in the debugger, the IntelliTrace NavBar is displayed in the editor margin. To see the return value of a method, click the &quot;Go to Previous Event&quot; button (Ctrl+Shift+F11) to step back to the method that you want to see the value for, shown below.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IntelliTrace NavBar" border="0" alt="IntelliTrace NavBar" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/UsingIntelliTracetoviewthereturnvalueofa_11CF7/image_11.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/UsingIntelliTracetoviewthereturnvalueofa_11CF7/image_11.png" width="845" height="651" /> </p>  <p>After clicking the button, the debugger will display the method that you stepped back to in the Autos window, as shown in the following screenshot.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Debugger Autos window" border="0" alt="Debugger Autos window" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/UsingIntelliTracetoviewthereturnvalueofa_11CF7/image_14.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/UsingIntelliTracetoviewthereturnvalueofa_11CF7/image_14.png" width="846" height="727" /> </p>  <p>Expanding the method in the Autos window will display the return value. The debugger displays the name of the return value as <strong>[Return Value]</strong>.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Return Value in Autos window" border="0" alt="Return Value in Autos window" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/UsingIntelliTracetoviewthereturnvalueofa_11CF7/image_19.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/UsingIntelliTracetoviewthereturnvalueofa_11CF7/image_19.png" width="657" height="240" />&#160;</p>  <p>Habib Heydarian.</p>]]></content:encoded>
    </item>
    <item>
      <title>IntelliTrace is not available. Why?</title>
      <link>https://docs.microsoft.com/archive/blogs/habibh/intellitrace-is-not-available-why</link>
      <pubDate>Thu, 22 Oct 2009 09:53:59 GMT</pubDate>
      <dc:creator><![CDATA[Habib Heydarian [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/habibh/2009/10/22/intellitrace-is-not-available-why/</guid>
      <description><![CDATA[When using IntelliTrace, you might run across the following error message in the IntelliTrace...]]></description>
      <content:encoded><![CDATA[<p>When using IntelliTrace, you might run across the following error message in the IntelliTrace window:</p>  <p><em>IntelliTrace is not available. See the Debugger Output window or the Windows Application Events Log.</em></p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IntelliTrace window" border="0" alt="IntelliTrace window" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/IntelliTraceisnotavailable.Why_1047D/image_3.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/IntelliTraceisnotavailable.Why_1047D/image_3.png" width="389" height="249" /> </p>  <p>Below is a list of reasons why you might see the above error message when trying to use IntelliTrace.</p>  <p>1) In Visual Studio 2010, IntelliTrace does not support debugging a 64-bit process inside Visual Studio. You can workaround this limitation by changing the project configuration for your project to 32-bit. See this <a href="https://blogs.msdn.com/habibh/archive/2009/10/12/how-to-edit-code-when-debugging-a-64-bit-application.aspx">article</a> for more details.</p>  <p>2) IntelliTrace is not available if you have attached to the application that you are debugging. The only workaround is to start the application under the debugger.</p>  <p>3) IntelliTrace is not supported for native C++ applications. We hope to fix this limitation in the future.</p>  <p>4) IntelliTrace does not support SQL CLR projects</p>  <p>If you have any feedback or are seeing the above error messages in other scenarios, feel free to send me feedback.</p>  <p>Habib Heydarian.</p>]]></content:encoded>
    </item>
    <item>
      <title>The future of debugging is here! Visual Studio 2010 now supports stepping back in the debugger.</title>
      <link>https://docs.microsoft.com/archive/blogs/habibh/the-future-of-debugging-is-here-visual-studio-2010-now-supports-stepping-back-in-the-debugger</link>
      <pubDate>Wed, 21 Oct 2009 22:05:20 GMT</pubDate>
      <dc:creator><![CDATA[Habib Heydarian [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/habibh/2009/10/21/the-future-of-debugging-is-here-visual-studio-2010-now-supports-stepping-back-in-the-debugger/</guid>
      <description><![CDATA[In my previous post Getting Started with Visual Studio 2010 IntelliTrace: Hello IntelliTrace!, I...]]></description>
      <content:encoded><![CDATA[<p>In my previous post <a href="https://blogs.msdn.com/habibh/archive/2009/10/20/getting-started-with-visual-studio-2010-intellitrace-hello-intellitrace.aspx">Getting Started with Visual Studio 2010 IntelliTrace: Hello IntelliTrace!</a>, I described how to use the new IntelliTrace feature in Visual Studio 2010 to debug an application. But there's more to IntelliTrace. IntelliTrace also allows you <em>step back</em> in the debugger! However, the step back functionality isn't enabled by default. You can enable this feature via Tools-&gt;Options-&gt;IntelliTrace. On the IntelliTrace Options dialog, select the <em>IntelliTrace events and call information</em> option. This is shown in the dialog below.</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="IntelliTrace Options" border="0" alt="IntelliTrace Options" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/HowtouseIntelliTracetostepbackintheVisua_FC71/image_3.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/HowtouseIntelliTracetostepbackintheVisua_FC71/image_3.png" width="648" height="379" /> </p>  <p>After selecting the option, you can now use the debugger step back through the code. In the following screenshot, you can see a <em>before</em> and <em>after</em> screenshot. On the left hand side (screen 1), the Step Back button is highlighted. The right hand side (screen 2) shows what happens after I've clicked the Step Back button, i.e. the debugger has stepped back into the calling function, Main().</p>  <p><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Before and After" border="0" alt="Before and After" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/HowtouseIntelliTracetostepbackintheVisua_FC71/image_6.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/HowtouseIntelliTracetostepbackintheVisua_FC71/image_6.png" width="804" height="621" /> </p>  <p>We are very excited about IntelliTrace and we think it's going to change developers' lives. If you have any questions or feedback about IntelliTrace, feel free to drop me a line.</p>  <p>Habib Heydarian.</p>]]></content:encoded>
    </item>
    <item>
      <title>Getting Started with Visual Studio 2010 IntelliTrace: Hello IntelliTrace!</title>
      <link>https://docs.microsoft.com/archive/blogs/habibh/getting-started-with-visual-studio-2010-intellitrace-hello-intellitrace</link>
      <pubDate>Tue, 20 Oct 2009 19:41:20 GMT</pubDate>
      <dc:creator><![CDATA[Habib Heydarian [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/habibh/2009/10/20/getting-started-with-visual-studio-2010-intellitrace-hello-intellitrace/</guid>
      <description><![CDATA[One of the most talked about features in Visual Studio 2010 Beta 2 is IntelliTrace. In a nutshell,...]]></description>
      <content:encoded><![CDATA[<p>One of the most talked about features in Visual Studio 2010 Beta 2 is IntelliTrace. In a nutshell, IntelliTrace allows a developer to record the application execution and play it back. Using IntelliTrace, a developer can do some cool things like step back in the debugger.</p>  <p>In this blog post, I'll do a &quot;Hello World!&quot; version of IntelliTrace to help you get started with this feature. We'll start with a vanilla Windows Form project and use it to explore various capabilities of IntelliTrace.</p>  <p>To start with, create a brand new Windows Forms project using either VB or C#. Then, drag and drop a button on the form, as shown below.</p>  <p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Hello IntelliTrace Application" border="0" alt="Hello IntelliTrace Application" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/GettingStartedwithVisualStudio2010Intell_E9B5/image_3.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/GettingStartedwithVisualStudio2010Intell_E9B5/image_3.png" width="300" height="300" /> </p>  <p>Double-click on the button and add the following line to the click event handler.</p>  <div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper">   <pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; border-right-style: none; background-color: #f4f4f4; margin: 0em; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; font-size: 8pt; border-left-style: none; overflow: visible; padding-top: 0px" id="codeSnippet">Debug.WriteLine(<span style="color: #006080">&quot;Hello IntelliTrace!&quot;</span>)</pre>
</div>

<p>Press F5 to run the application and then click on the &quot;Hello IntelliTrace!&quot; button. On the right-hand of the screen, you should see a new window called the IntelliTrace window, as shown below. Click on the &quot;Break All&quot; link in the IntelliTrace window.</p>

<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/GettingStartedwithVisualStudio2010Intell_E9B5/image_7.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/GettingStartedwithVisualStudio2010Intell_E9B5/image_7.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IntelliTrace window" border="0" alt="IntelliTrace window" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/GettingStartedwithVisualStudio2010Intell_E9B5/image_thumb_2.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/GettingStartedwithVisualStudio2010Intell_E9B5/image_thumb_2.png" width="339" height="373" /></a> </p>

<p>After clicking the &quot;Break All&quot; button, the IntelliTrace window displays a number of very useful &quot;events&quot;, as shown below. IntelliTrace records what happened in your application in chronological order. So, reading down the IntelliTrace window, you can see that the following things happened:</p>

<ol>
  <li>The application started under the debugger </li>

  <li>The user clicked on a button with the label &quot;Hello IntelliTrace!&quot; </li>

  <li>The application output some trace information using Debug.WriteLine() </li>

  <li>The application paused in the debugger </li>
</ol>

<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="IntelliTrace window with annotations" border="0" alt="IntelliTrace window with annotations" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/GettingStartedwithVisualStudio2010Intell_E9B5/image_13.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/GettingStartedwithVisualStudio2010Intell_E9B5/image_13.png" width="339" height="373" /> </p>

<p>What IntelliTrace is doing is keeping a <em>diary</em> or <em>journal</em> of the application as it was executing so that you can read through what happened. But what really makes the experience that much more compelling is that you can click on an event in the IntelliTrace window and navigate to the source code that caused that event, shown here.</p>

<p><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Source window" border="0" alt="Source window" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/habibh/WindowsLiveWriter/GettingStartedwithVisualStudio2010Intell_E9B5/image_16.png" original-url="https://blogs.msdn.com/blogfiles/habibh/WindowsLiveWriter/GettingStartedwithVisualStudio2010Intell_E9B5/image_16.png" width="800" height="372" /> </p>

<p>In the next blog, I'll describe how you can customize IntelliTrace to collect additional events such as opening a file or reading from Windows registry keys.</p>

<p>Habib Heydarian.</p>]]></content:encoded>
    </item>
  </channel>
</rss>