The tool windows in C#

When one of the debugging or Express editions in the video studio, the tool window will change to the bottom of the screen and a new window will appear (unless you turn them off). Windows is called on the lines of "Local", "Clock", "Call Stack" and "Instant Window" and all of these are related to debugging experience. In this chapter we will look at each of them and show you what they can do for you.

Locals

This window is the easiest of them when a breakpoint hits, so all local variables will be listed here, so that you can get a quick overview of your name, type and price. You can right-click on the grid and assign a new value, so that you can select "Edit value". This allows you to test your code under current conditions from other conditions.

Watch

The look window is a bit like a local window, only here you decide which variable is tracked, by dragging it from the code window through the local or global local window or by typing your name on the last, empty line Can add variables. can do. Unless you remove it again, your variables will remain in the clock window, but only when you want to debug within the current radius will be updated. For example, a variable in Function A will not be updated, when you go into Function B. Just like the Locale window, you can right-click the variable seen and select "Edit value" to change the current value of the variable.

call stack

The call stack window will show you the current hierarchy of the tasks described. For example, if the function calls a call function function c, which calls the function d, the call stack window will show it, and you will be able to jump on each function declarations. You can also see which parameters were passed for each function. In simple examples we have done so far, it can be a future, because the function call to keep track, which function call is trivial, but as soon as your code reaches a high level of complexity and you have other functions , Functions Classes in Functions, Call Pile can save a real life.

Immediate window

The immediate window is probably the most useful for all of them. This allows you to execute the custom line of code in the current reference of debugger, this allows you to check the variable, change its values ​​or test a line of code. You type it in the window, press enter and the line will be executed. Type a variable name, and its value will be printed. Define a variable value by typing a = 5. The result, if any, will be printed and any changes you make, will be reflected when you continue to execute the code. The instant window is like the C # terminal, where you can enter the code and you can see the results immediately - once you use it, you may be addictive. I know I am.