<?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>Visual Studio Tutor &#187; Debugging</title>
	<atom:link href="http://www.visualstudiotutor.com/tag/debugging/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.visualstudiotutor.com</link>
	<description>Visual Studio Tutorials</description>
	<lastBuildDate>Sun, 24 Apr 2011 12:54:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>Change the Default Browser In Visual Studio</title>
		<link>http://www.visualstudiotutor.com/2011/02/change-set-default-browser-visual-studio/</link>
		<comments>http://www.visualstudiotutor.com/2011/02/change-set-default-browser-visual-studio/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 15:27:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[broswer]]></category>
		<category><![CDATA[Debugging]]></category>

		<guid isPermaLink="false">http://www.visualstudiotutor.com/?p=218</guid>
		<description><![CDATA[To change the default browser Visual Studio opens when running a web application simply follow the below 3 steps: Right-Click on any webform ( such as default.aspx ). Select &#8220;Browse With&#8230;&#8221; In the dialog box you will be shown the currently installed browsers. Highlight the browser you wish to use and click the Set as [...]]]></description>
			<content:encoded><![CDATA[<p>To change the default browser Visual Studio opens when running a web application simply follow the below 3 steps:</p>
<ol>
<li>Right-Click on any webform ( such as default.aspx ).</li>
<li>Select &#8220;Browse With&#8230;&#8221;</li>
<li>In the dialog box you will be shown the currently installed browsers. Highlight the browser you wish to use and click the Set as Default button.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.visualstudiotutor.com/2011/02/change-set-default-browser-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Debug a Stored Procedure in Visual Studio</title>
		<link>http://www.visualstudiotutor.com/2011/02/debug-stored-procedure-visual-studio/</link>
		<comments>http://www.visualstudiotutor.com/2011/02/debug-stored-procedure-visual-studio/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 14:42:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Debug]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Stored Procedure]]></category>

		<guid isPermaLink="false">http://www.visualstudiotutor.com/?p=212</guid>
		<description><![CDATA[To debug a stored procedure (sproc) in Visual Studio follow the below steps Start Visual Studio and then create a new SQL Server project (File &#62; New &#62; Project &#62; Database Projects) In the dialog box, select the database (in this example the NORTHWIND database) and click Yes to create the project. Add a  new [...]]]></description>
			<content:encoded><![CDATA[<p>To debug a stored procedure (sproc) in Visual Studio follow the below steps</p>
<ol>
<li>Start Visual Studio and then create a new SQL Server project (File &gt; New &gt; Project &gt; Database Projects)</li>
<li>In the dialog box, select the database (in this example the NORTHWIND database) and click Yes to create the project.</li>
<li>Add a  new Stored procedure named SampleSproc to the project (this will also add a SampleSproc.cs file to the project.)</li>
<li>Enter some code into the stored procedure, for example:
<pre>public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void SimpleStoredProcedure(SqlString name)

{
using (SqlConnection sqlConn = new SqlConnection("context connection=true"))

{
String sqlStr = string.Format("Insert into [TableName] (FieldName, ...) values ('{0}', ...)", name);
SqlCommand cmdObj = new SqlCommand(sqlStr, sqlConn);

try
{
sqlConn.Open();
cmdObj.ExecuteNonQuery();
}

catch (Exception ex)
{
}
}
}
};</pre>
</li>
<li>Enter a test script in the Test.sql file, eg:
<pre>exec SimpleStoredProcedure 'testname1'

select * from [TableName] where [FieldName] = 'testname1'</pre>
</li>
<li>Right click the project,and then select to build and deploy it</li>
<li>Look in the Server Explorer to check and the stored procedure has been created</li>
<li>Right click the stored procedure and then select “Step into Stored Procedure” and Visual Studio will start the debugging.</li>
</ol>
<p>For more info on SQL/CLR debugging: <a rel="nofollow" href="http://msdn.microsoft.com/en-us/library/ms165051(VS.80).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms165051(VS.80).aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.visualstudiotutor.com/2011/02/debug-stored-procedure-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disable JavaScript Debugging in Visual Studio</title>
		<link>http://www.visualstudiotutor.com/2011/02/disable-stopjavascript-debugging-in-visual-studio/</link>
		<comments>http://www.visualstudiotutor.com/2011/02/disable-stopjavascript-debugging-in-visual-studio/#comments</comments>
		<pubDate>Mon, 21 Feb 2011 14:33:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[javascript debugging]]></category>

		<guid isPermaLink="false">http://www.visualstudiotutor.com/?p=206</guid>
		<description><![CDATA[There are three methods for turning off Javascript debugging in Visual Studio (which is enabled by default). Method 1 Start the application without debugging it (press Ctrl + F5) Attach the Visual Studio Debugger to WebDev.WebServer.exe process Method 2 Right click the app to debug and select Properties Hit the Web tab on the left [...]]]></description>
			<content:encoded><![CDATA[<p>There are three methods for turning off Javascript debugging in Visual Studio (which is enabled by default).</p>
<p><strong>Method 1</strong></p>
<ol>
<li>Start the application without debugging it (press Ctrl + F5)</li>
<li>Attach the Visual Studio Debugger to WebDev.WebServer.exe process</li>
</ol>
<p><strong><strong>Method 2</strong><br />
</strong></p>
<ol>
<li><span style="font-weight: normal;">Right click the app to debug and select Properties</span></li>
<li><span style="font-weight: normal;">Hit the Web tab on the left and select “Don’t open page” on the left panel</span></li>
<li><span style="font-weight: normal;">Start Debugging the app (press F5)</span></li>
<li><span style="font-weight: normal;">Open your browser and then navigate to the URL.</span></li>
</ol>
<p><strong>Method 3</strong></p>
<ol>
<li>Open the application Property page and select the Web tab</li>
<li>Select “Start External Program” and set the path to iexplorer.exe</li>
<li>Enter the URL in the Command line argument option</li>
<li>Hit F5 to commence debugging.</li>
</ol>
<p>For more on how to disable  JavaScript debugging, please see <a rel="nofollow" href="http://blogs.msdn.com/greggm/archive/2009/04/06/disabling-script-debugging-in-vs-2008-ie8.aspx" target="_blank">http://blogs.msdn.com/greggm/archive/2009/04/06/disabling-script-debugging-in-vs-2008-ie8.aspx</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.visualstudiotutor.com/2011/02/disable-stopjavascript-debugging-in-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Remote Debugging using Visual Studio</title>
		<link>http://www.visualstudiotutor.com/2011/02/remote-debugging-using-visual-studio/</link>
		<comments>http://www.visualstudiotutor.com/2011/02/remote-debugging-using-visual-studio/#comments</comments>
		<pubDate>Sat, 19 Feb 2011 08:14:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Remote Debugging]]></category>

		<guid isPermaLink="false">http://www.visualstudiotutor.com/?p=202</guid>
		<description><![CDATA[To use Visual Studio remote debugging both the remote machine and the local machine need to be in the same domain. Ensure that you are using the same account / password on both machines and that both have Administrator privileges. Then follow the below steps to implement remote debugging: Log on the remote machine  with [...]]]></description>
			<content:encoded><![CDATA[<p>To use Visual Studio remote debugging both the remote machine and the local machine need to be in the same domain. Ensure that you are using the same account / password on both machines and that both  have Administrator privileges. Then follow the below steps to implement remote debugging:</p>
<ol>
<li>Log on the remote machine  with the account and password as your local machine.</li>
<li>Run the remote debugger monitor on the remote machine (this is located at C:Program FilesMicrosoft Visual Studio 9.0Common7IDERemote Debuggerx86). To ensure that you will be running the correct remote debugger monitor, it is a good idea to copy the  local machine&#8217;s one to the remote machine.</li>
<li>Run the application to be debugged on the remote machine</li>
<li>Open Visual Studio on the local machine</li>
<li>Go to Tools -&gt; Attach to Process which will open the Attach to process dialog .</li>
<li>Locate the Server name in the remote debugger monitor on the remote machine and enter the server&#8217;s name in the Qualifier box on the local machine</li>
<li>Locate the application&#8217;s process in the Available process section, specifying the correct code type, and then click the Attach button</li>
<li>Set your breakpoints and then run the app on the remote machine and a breakpoint will be hit.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.visualstudiotutor.com/2011/02/remote-debugging-using-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Studio Debugging Tutorial &#8211; Basics</title>
		<link>http://www.visualstudiotutor.com/2010/02/visual-studio-debugging-tutorial-basics/</link>
		<comments>http://www.visualstudiotutor.com/2010/02/visual-studio-debugging-tutorial-basics/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 08:22:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Debugging]]></category>

		<guid isPermaLink="false">http://www.visualstudiotutor.com/?p=3</guid>
		<description><![CDATA[If there&#8217;s a single feature of Visual Studio that every developer uses and is essential to the development process it is the built-in debugger. Debugging can be commenced by clicking the green arrow button in the VS toolbar, selecting Debug-Strart Debugging from the menu, or hitting F5. Before commencing debugging you will need to select [...]]]></description>
			<content:encoded><![CDATA[<p>If there&#8217;s a single feature of Visual Studio that every developer uses and is essential to the development process it is the built-in debugger.</p>
<p>Debugging can be commenced by clicking the green arrow button in the VS toolbar, selecting Debug-Strart Debugging from the menu, or hitting F5. Before commencing debugging you will need to select what exactly you are debugging, just starting debugging will commence the project from the default point. For a Web Forms app, if you want to start from another page other the default start page right click the page and select Set As Start Page. For a Win Forms app set the start Form in the application properties window first.</p>
<p>Prior to debugging, it will almost always be necessary to to set some breakpoints. Breakpoints pause the execution of the code and allow developers to examine controls and variables before allowing the program to continue to execute. Set a breakpoint by clicking in the margin of the code editor to and a red ball with code highlighted will appear (as shown below). The program&#8217;s execution will now be halted immediately <em>before </em>the highlighted line of code is hit.</p>
<p><img class="size-full wp-image-6 alignnone" title="ScreenHunter_01 Feb. 11 15.31" src="http://www.visualstudiotutor.com/wp-content/uploads/2010/02/ScreenHunter_01-Feb.-11-15.31.gif" alt="" width="414" height="91" /></p>
<p>So if we now hit F5 and start debugging there should be a delay as the project is built and the code will then be highlighted in yellow with a yellow arrow at the left:<br />
<img class="alignnone size-full wp-image-7" title="ScreenHunter_02 Feb. 11 15.42" src="http://www.visualstudiotutor.com/wp-content/uploads/2010/02/ScreenHunter_02-Feb.-11-15.42.gif" alt="" width="394" height="84" /></p>
<p>At this point we can view variable values by hovering over them. Hovering over the <em>vsTutor </em>variable shows a value of 0 , hovering over the<em> i </em>variable does not work as the highlighted line as not been executed and the<em> i </em>variable not instantiated.</p>
<p>There are a number of important windows to monitor objects as the code executes, these are located in the bottom left by default but if not visible they can be opened from Debug&gt;Windows.<br />
The <strong>Watch </strong>window allow monitoring of any object which can simply be highlighted in the code window and dragged to the Watch window. The Watch window monitor objects regardless of whether they are in scope or now.<br />
The <strong>Locals </strong>window cannot have objects dragged into it and shows all objects that are currently in scope. A powerful feature of the locals window is that it allow the objects to by modified. In this example, the value of the vsTutor variable can be modified by clicking and changing the number in the Value column.<br />
The <strong>Autos </strong>window shows the objects used in the execution of the current statement.<br />
The <strong>Immediate </strong>window allows for statements to be written and executed as the program&#8217;s execution is paused.<br />
The <strong>Breakpoints </strong>window allows the breakpoints for the project to be managed by enabling, disabling or deleting them.</p>
<p>At all times the yellow arrow shows the line of code that will be executed next. This arrow can be dragged down to execute subsequent lines of code without executing the code that it is dragged over.</p>
<p>When in debug mode the Debug toolbar will either appear in the main tool bar of Visual Studio or a floating toolbar as show below.</p>
<p><img class="alignnone size-full wp-image-11" title="ScreenHunter_04 Feb. 11 16.09" src="http://www.visualstudiotutor.com/wp-content/uploads/2010/02/ScreenHunter_04-Feb.-11-16.09.gif" alt="" width="305" height="59" /></p>
<p>The three buttons to the right of the yellow arrow are crucial to the debug process:<br />
<strong>Step Into </strong>executes the next line of code that the program would normally execute.<br />
<strong>Step Over </strong>proceeds to the next line of code in the current procedure, this means that other routines (such as functions) are called it will not proceed into those routines but simply execute them and continue to the next line of the current code block.<br />
<strong>Step Out </strong>will move to the line of code which called the current process or the next breakpoint if that comes first.<br />
In the next Debugging Tutorial we will proceed to examine more advanced Visual Studio debugging topics.</p>
<p>Note : The new WebMatrix web development tool has been released by Microsoft which features a well integrated suite of dev tools, check out <a href="http://www.aspnet101.com/2010/07/webmatrix-tutorial-part-1/">WebMatrix Tutorial</a> for more info</p>
]]></content:encoded>
			<wfw:commentRss>http://www.visualstudiotutor.com/2010/02/visual-studio-debugging-tutorial-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

