C# Debugging: Breakpoints

preview_player
Показать описание

Learn both the basics and the more advanced uses of the breakpoint inside C#. Along the way, you might pick up a tip or two on what steps you should take to debug an application.

0:00 - Getting an exception
2:12 - Creating a break point and how does it work
4:21 - Step Into (Breakpoint controls) and debugging.
12:16 - Breakpoint pinned values
15:41 - Breakpoint Actions - logging breakpoint values
19:28 - Breakpoint Conditions - hit breakpoint under conditions
22:45 - Step Out (Breakpoint controls) - go through method you stepped in
25:18 - Step Over (Breakpoint controls) - do not go in to called methods
Рекомендации по теме
Комментарии
Автор

0:00 - Getting an exception
2:12 - Creating a break point and how does it work
4:21 - Step Into (Breakpoint controls) and debugging.
12:16 - Breakpoint pinned values
15:41 - Breakpoint Actions - logging breakpoint values
19:28 - Breakpoint Conditions - hit breakpoint under conditions
22:45 - Step Out (Breakpoint controls) - go through method you stepped in
25:18 - Step Over (Breakpoint controls) - don't go in to called methods

RalfsBalodis
Автор

I thought I already know this topic, but "pin" and "action" are new to me. Glad that I watched it! Thanks, as always!

xianyu
Автор

Action is going to be extremely useful for me going forward. Thanks, Tim!

MrLuckyalmond
Автор

What a great tutorial - even though the sound was a bit low. Thanks!

kpr
Автор

I have been coding since 6 and I have never thought of using this, Thank you for the demonstration.

summerbreezesyria
Автор

Tim, your videos are really great learning tools. You voice is perfect for this (you must have taken public speaking)

Can you cover the topic of remote debugging in the future?
I have seen many times where on my dev machine the code runs fine, but out on a production PC with the same application installed we have run-time issues.

keep up the excellent videos,
Thanks

scottlachance
Автор

Thank you! I wish more information I went looking for was explained so well.

TheRedjinator
Автор

Here comes a very useful tip:
If an error occurs in an extensive loop pass, you know in which line it happens, but not in which pass.
In such a case, it helps to set a debug point on the line in question and to set a number of hits as a condition that is so high that it can never be reached (e.g.
If you run the application again and the error occurs, you can move the mouse over the debug point and see how many runs it took.
Then change the number of hits to exactly this value and run the application again.
Now the execution stops exactly at the line that caused the error and this happens in the pass in which the error occurs.
Now you can look at the values of the variables and see what doesn't fit.

Alquien
Автор

Thank U very much! very helpfull and powerfull doing things well since details.

davidramirez
Автор

About getting a general idea where an exception is thrown, in the first run of the program the program shows the line an exception occured so i guess one can start from there.

ZeroSleap
Автор

I have some debugging experience and therefore I really Like Visual Studio learning programming in C#. But, I am really wandering if with other languages like Java, Python also have (advanced) debugging options ..because without debugging sourcecode I will not like to program in it!

confidential
Автор

Why are you use "FirstName.Substring" instead of "FirstName[i]" ? Is it better for perfomance or something like this?

rivan
Автор

wish i knew about this before
i used to place variables before the error came and comment the rest of the code
its much better now - thx

ikazuchi-san
Автор

nice video... where i can get all o these source code? can anybody help?

RuhulAmin-ogwi
Автор

Hard to hear you, sound is very low. Great video though. Explained well and in a simple manner.

itshassanaziz