A generic example illustrates:
- This series of blogs discusses only the basics of the tool and does not discuss any language.
- Don't even discuss shortcut keys:-)
- You can complete this tutorial with the mouse
- The IDE default refers to Visual Studio Community Edition. At the end of this series of articles, you can skillfully use it to write programs.
- The default layout state after Visual Studio startup is called the main window, and the project name displayed in the title bar of the main window is not necessary.
- Several symbols describing menu actions are defined on the basis of daily spoken language and Windows Explorer: [], {},/, >>, =, (,).
- check that a setting item is represented by:
- [Window name]/{menu name}/{submenu name}/{Set item Item name}= Set value of item
- For example, the default Debug configuration:
- [Main Window]/{solution Configuration Manager}=debug
- When checking multiple settings items, write each one in the same way as a single set item
- When you check that a setting item has multiple values , parentheses are used to separate them with internal commas, such as:
- [Solution Explorer]/{project name}/{reference}= (system,system.core,system.data,system.xml)
- To perform a left-click sequence is to replace the last check with "/", such as exiting the IDE:
- [main window]/{file}/{exit}/
- The connection symbol for the right-click menu is >>, such as refreshing the Windows desktop:
- The representation of a setting item in a pop-up window is similar to
- The representation of the set item in the MDI child window is similar to the above, noting that in Visual Studio, the name of the MDI child window is in its upper-left corner or may be automatically adsorbed around the main window
- title bar and status bar as the promotion of the menu, applicable to the above presentation method
- Defect description
- Welcome feedback, mailto:[email protected]
- The preferred language for the author is C #
- The author is a soft dog
- The author's IDE does not have a Chinese language pack, so some nouns are not translated correctly:-(
- Due to the lack of clarification of the relevant certificate issues, copyright reserved
- Series of articles did not propose or solve new problems, the purpose is only science
Body
This period of time some things caused the blog did not pick up, caused by the inconvenience please forgive me. Thank you for your attention and support.
Visual Studio integrates powerful tools for graphical operation of location breakpoints, which are all the golden fingers to write application essentials.
Statement Breakpoint
You can set the statement breakpoint by moving the cursor to the line where you want to set the breakpoint:
[Main window]/{debug}/{Toggle Breakpoint}/
When the application runs to the statement, Visual Studio interrupts the application's operation, automatically attaches powerful debugging tools, and opens the Auto window Subwindow for debugging.
Common debugging operations are:
- [Main window]/{debug}/{per statement}: Run the next line of code.
- [Main window]/{debug}/{Step by step}: If the next line of code calls a method, it will enter that method.
- [Main window]/{debug}/{jump out}: Jump out of the current method, that is, return to the outer layer of the call stack.
- [Main window]/{debug}/{Continue}: Let the program run to the next breakpoint.
- [Auto window] Subwindow: This sub-window is used to view and set the values of each variable at interrupt run time, which is visible when debugging, which is the essence of Visal Studio 1.
- [Breakpoint] Subwindow: This subwindow is the management window for breakpoints, including new breakpoints, disabling breakpoints, go to source code, disassembly, and so on. Press [main window]/{debug}/{window}/{Breakpoint}/, you can open it. This is the essence of Visual Studio 2.
Function Breakpoint
It is tedious to set breakpoints over and over in the source code file. Breakpoints can be set by the name of the function,
[Main window]/{debug}/{window}/{breakpoint}/, open [Breakpoint] child window
[Breakpoint]/{new}/{at function terminal}/, outgoing [New Breakpoint] Window
You can set a breakpoint on a function by typing the name of the function in the New Breakpoint window, and you can use the class name. function to limit the search scope, which also handles debugging of the interface implementation well. The specific situation is to be manipulated by referring to the display item in the [breakpoint] subwindow.
The basic operation in a function breakpoint is consistent with a statement breakpoint.
Advanced Breakpoints
Suppose we have a loop that executes 100,000 times, hoping it will break after 99,999 executions, what should I do?
It's a good conscience to set advanced properties for breakpoints in Visual Studio, including judging values, setting the number of loops, and so on.
[Breakpoint]/{Breakpoint N}>>, that is, in the [breakpoint] sub-window right-click a breakpoint, you can set the advanced interrupt properties, which will be combined with specific code specific operation.
Graphical operations advanced breakpoints are the essence of Visual Studio 0.
Manage breakpoints
Breakpoints can be disabled, toggled, exported to a file, imported from a file.
These features are in the [Breakpoints] sub-window. It is recommended to manage breakpoints through this subwindow.
Some things to keep in mind
The disassembly feature in debugging is available at run time. The plain text source editing phase is grayed out (not available).
Visual Studio can also support debugging tools as external tools. Visual Studio is powerful enough for a single developer. However, as long as there is a possibility of synergy, it is best not to rely solely on visual Studio.
Documentation, source code control, and bug tracking are just as important.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Breakpoint Debugging--llorch Basic Visual Studio Tutorial (iii)