
http://www.youtube.com/user/kudvenkat...
Link for slides, code samples and text version of the video
http://csharp-video-tutorials.blogspo...
Watch window is a very useful debugging tool and can be used to evaluate variables and expressions and edit the value of a variables if required.
Let's understand using the watch window with an example. Create a new console application with name = ConsoleApplication1. Copy and paste the following code.
using System;
namespace ConsoleApplication1
{ class Program { static void Main() { int Sum = PrintSum(1, 2, 3); Console.WriteLine(Sum); } static int PrintSum(int n1, int n2, int n3) { int sum = n1 + n2 + n3; return sum; } }
}
To get to the watch window,
1. Place a break point on PrintSum() function
2. Run the application in debug mode
3. Click on Debug - Windows - Watch - Watch1 OR Use the keyboard shortcut - Ctrl + D, Ctrl + W
At this point, we should have the watch window displayed.
There are several ways to add variables and expressions to watch window
1. In the PrintSum() function, right click on "n1" variable and select "Add Watch" from the context menu.
2. In the watch window, type the name of the variable in Name column and press "Enter" key
3. Dragging and dropping or by copying and pasting.
If you are following along, the watch window should display the name, value and type of variables n1 and n2.
To change the value of a variable in the watch window, simply type the new value in the value column of the watch window and press "Enter" key. For example, to change the value of n1 from 1 to 10. Simply type 10 in the value column and press Enter key.
Watch window can also be used to evaluate expressions. For example to check if n1 IS EQUAL TO n2.
Enter the expression n1==n2 in the name column of watch window and press Enter key. Notice that the expression return type and value is displayed.
When a value of a variable that is added to the watch window changes, the new value is reflected in the watch window. For example, at the moment
1. There is a breakpoint at the opening curly brace of the PrintSum() function
2. Now add "sum" variable to the watch window
3. Notice that the value of the "sum" variable is 0
4. Press F10 twice, and notice that the value of "sum" variable is changed to 15.
To delete all items from the watch window, right click on the watch window and select "Clear All" from the context menu.
You can also call a function from watch window. Simple type the name of the function, pass the required parameter values and press Enter key.
asp.net core docker Part 6 Watch window in visual studio | |
155 Likes | 155 Dislikes |
34,956 views views | 524K followers |
Education | Upload TimePublished on 27 Apr 2014 |
Related keywords
wcf vs web api,ado.net core,sql server management studio,webkinz,webadvisor,craigslist nj,windows 7 usb,wcf one piece,asp.net core 3,ajax players,weber grill parts,webtoon,tutorials by hugo,debugging react native,csharp corner,mvc design pattern,visual studio online,asp.net machine account,servers for minecraft,asp.net core dependency injection,ado.net tutorial,services angular,visual studio 2017,visual studio 2015,ajax ontario,windows defender,visual studio 2012,visual studio 2010,tutorial definition,tutorial on excel,visual studio 2010 tools for office runtime,asp.net mvc tutorial,asp.net cos'è,csharp assembly,tutorialspoint python,sql join,services briefcase,asp.net core web api,ajax jquery,visual studio community 2019,wccftech,windows movie maker,craigslist ny,visual studio 2019,windows 10 1903,asp.net zero,csharp foreach,server memes,sql date format,services online,chase,serverless architecture,server resume,wcf c#,server books,tutorialspoint javascript,mvcc connect,ado.net mysql,services technologies gps,ajax deadpool,server jobs,cvs,debugging tools for windows 7,website,mvc tutorial,costco hours,wcf service application,debugging mode,tutorialspoint spring,serverless,wcf soap,wcf cat,cool math games,wcf test client,services & training hse colombia sas,servicestack,citibank,asp.net core identity,sql union,ajax parking,sql database,asp.net core logging,visual studio code online,mvconnect,cunyfirst,asp.net guida,wcf nba,csharp download,wcfi foundation,csharp online,wcf authentication,tutorials near me,http://asp.net,server 2019,chernobyl,ado.net descargar,web of dreams,serverminer,ajax cleaner,ado.net visual studio 2019,tutorial for windows 10,webassign,ado.net vs entity framework,ado.net visual studio 2017,csharp list,sql like,debugging mode windows 10,asp.net mvc,asp.net core tutorial,sqlite,wcfm,windows xp,ajax roster,tutorial gateway,mvc architecture,http://ado.net,asp.net core mvc,ajax soccer,server hosting,visual studio code español,wcfi,ajax dish soap,debugging mode cobol,capital one,server rack,tutorialspoint html,csharp interface,craigslist,windows 7,windows 7 download,webroot,tutorialspoint reactjs,ajax request,wcf dragon ball,asp.net core 2.2,tutorialspoint python 3,sql developer,visual studio express,webster,windowslive,services transmission company sas,sql group by,debugging station ps3,asp.net core signalr,services manager,mvc framework,ajax paving,debugging angular,mvc near me,windows 10 pro key,tutorialspoint spring boot,windows,debugging tools,mvc map,csharp online compiler,asp.net download,sql between,ado.net c# pdf,services tag dell,wcf 2019 nba,visual studio code download,csharp switch,ado.net ventajas y desventajas,csharpstar,wcf tutorial,tutorialspoint,ajax meaning,csharp-video-tutorials.blogspot,tutorials dojo,tutorial mission gta online,central park 5,csharp string format,ado.net c#,asp.net core github,windows 7 iso,server status,ajax fc,windows update,server jobs nyc,asp.net core swagger,sql formatter,credit karma,services group,server error in '/' application,windows 10 ราคา,services windows,asp.net core 3.0,sql injection,tutorialspoint c#,wcf ria services,debugging with visual studio code,calculator,ado.net entity data model,sql insert,tutorialspoint tableau,debugging php,services google play apk,sqlyog,asp.net core 3 release date,sql server,server job description,tutorials by a,servicenow,webcam,mvc hours,debugging bash scripts,webmd symptom,csharp array,debugging symbols,csharp enum,ajax call,asp.net core 2. guida completa per lo sviluppatore,asp.net core,server pro,server status ffxiv,debugging duck,cheap flights,webcrims,asp.net core hosting,services sas,windows 10 แท้,visual studio code,tutorialspoint java,tutorialspoint java compiler,webmd,csharp to json,college football,ado.net dataset,csharp dictionary,tutorial meaning,cnn,website builder,tutorial.mc-complex,tutorialspoint sql,asp.net web api,windows 10 home,server side rendering,weber grills,debugging react,sql server 2017,tutorialspoint spark,mvc nj,ado.net oracle,asp.net core download,csharp to vb.net,webster bank,webstaurant,tutorial systems,tutorialsystems,tutorial teacher,ajax post,services fms publish announcement,services.msc no abre,visual studio code ubuntu,visual studio mac,ajax jersey,csharp operator,asp.net core razor pages,server duties,asp.net core environment variables,tutorial on variational autoencoders,csharp random,windows 10 update,century 21,visual studio code portable,debugging with gdb,services consultores,services consulting,mvcsd,services.msc,debugging makefile,mvcsc,ado.net pdf,asp.net core configuration,ajax marvel,tutorial synonym,sql update,asp.net tutorial,mvc medical,debugging javascript,ado.net entity data model visual studio 2019,wcfs international curriculum,mvc2,ado.net entity data model visual studio 2017,windows usb/dvd download tool,chase online,wcf api,windows 7 usb dvd download tool,costco,visual studio installer,server jobs near me,webex,sql meaning,sql tutorial,debugging tools for windows,sql commands,ado.net entity framework,windows 8.1,ajax tavern,visual studio descargar,windows 10,visual studio community,tutorialsteacher,ajax javascript,services desk,debugging usb android,ajax greek,csharp tutorial,mvc pattern,ado.net sql server,ado.net connection,asp.net identity,mvcu,asp.net core middleware,wcf web service,visual studio c++,mvc webadvisor,tutorial music,debugging python,web store,mvcc,webmail,mvci,mvctc,
Không có nhận xét nào:
Đăng nhận xét