This article is currently in the process of being translated into Hungarian (~27% done).
If you are fluent in Hungarian, then please help us - just point to any untranslated element (highlighted with a yellow left border - remember that images should have their titles translated as well!) inside the article and click the translation button to get started. Or have a look at the current translation status for the Hungarian language.
If you see a translation that you think looks wrong, then please consult the original article to make sure and then use the vote button to let us know about it.
Please help us by translating the following metadata for the article/chapter, if they are not already translated.
If you are not satisfied with the translation of a specific metadata item, you may vote it down - when it reaches a certain negative threshold, it will be removed. Please only submit an altered translation of a metadata item if you have good reasons to do so!
A hibakeresés során a legelső dolog, amit ismernünk kell, a breakpoint. Tényleg pontosan azt teszi, amit a név sugall – kijelöl egy pontot a programban, ahol a végrehajtás szünetel (és nem, nem fogja feltörni a programot, nem kell aggódni). A breakpoint beillesztése a Visual Studio vagy az Express verziókba egy egyszerű kattintás a bal egérgombbal a baloldali szürke oldalsávban. Ha rákattintunk, jutalomként fényes pirospontot kapunk – ez a pont jelöli azt a helyet, ahol a hibakereső megáll, amikor végrehajtja az alkalmazást. Jobb, ha meg is nézzük, és a hatás megtekintéséhez a következő programrészletet fogjuk használni:
static void Main(string args)
int a = 5, b = 8, c = 233;
int d = a + c - b;
Now, can you predict the result just from looking at the code? Probably, and if not, you could just get out the old calculator and do the math, but that's not really the point. Just imagine the amount of code being much bigger, and let's debug the thing! Place a breakpoint by clicking in the left gutter - your IDE should now look something like this:
Okay, you're ready to start your first debugging session. As soon as you have placed the breakpoint, you can just run your application like you normally would - from the menu, the toolbar or by pressing F5. What happens now is that the application is executed just like normal, but as soon as a line with a breakpoint is reached, the execution is stopped right before that line would be executed. In this case, it means that the variables a, b and c will have a value, but d will only have it's default value (which is 0 for an integer), since it won't be set before the line with the breakpoint has been evaluated. Now, here comes the cool part - try hovering your mouse over the different variables - the IDE will tell you what they contain. As mentioned, the d variable will have it's default value, but let's change that, by moving forward in the execution. In the next chapter, I will show you how to navigate around your code, while it's being executed.