![]() ![]() In the image above, you can distinguish the two types of breakpoints: A large red dot will appear that looks like this: Types of Breakpoints Locate the lines of code or the variables that interest you, then click with the left mouse button on the side of the window between the line number and the corresponding code. To set a breakpoint, you need a mouse and your right hand (or left, but that’s less common). Your program will pause each time this variable is modified (or even accessed). Each time the corresponding code is about to be executed, your program will pause. Line-of-code breakpoint: in a method or loop. You will mainly use the following two types of breakpoints: This mechanism is much more powerful and efficient than logging, because you can see where you are in real time-and avoid reading dozens (sometimes hundreds) of lines of code. ![]() If everything seems all right to you, you can have the execution resume. ![]() You can then analyze the value of each variable, to make sure that everything is as it should be. That is, how to step through your program execution, one line at a time, observing the values of all of the variables that interest you and locating the infamous bug that has been keeping you up at night! BreakpointsĪ breakpoint allows you to pause the execution of your application at a specific location. In this chapter, you will learn how to launch your application in Debug mode. Your application is not responding correctly it is not behaving as expected. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |