From the course: LINQPad Essential Training

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

The debug Locals and Watch windows

The debug Locals and Watch windows - LINQ Tutorial

From the course: LINQPad Essential Training

The debug Locals and Watch windows

- It's always useful to inspect variables, while you're debugging, and we have some tools in LINQPad for that. So let me rerun this query, with the debugger attached, and what I want you to see, at the bottom of the window, is there's a threads tab, there's a local tab, there's a watch tab. You can add variables to the watch, by right clicking on them, and choosing add watch. I won't do that, but we will take a look at locals. So right now I can see that X is set to value of four, and it's a 32 type. Again this is almost identical, to what you have in Visual Studio. In Visual Studio, you can hover over a variable to see the content, and the state of that variable, and you can do that here. Let's step through the code by pressing F11. You'll notice that the scope changes, when I stepped into that method. And now as I moved down to line seven, I now see that the list has been instantiated. And I can expand…

Contents