Debug mode using the Intellij IDEA

Has not been seriously studied debug, so determined to learn about and see a good article, it is recorded

  Debug code used to track the operation of the process, typically an exception occurs during program execution, Debug mode may enable analysis of abnormal position location, and parameter changes during operation. Usually we can also enable the Debug mode to track running processes to learn the source code tripartite framework.

A, debug opening

First, look at the interface of IDEA in Debug mode.

  The following is a start in Debug mode IDEA, the interface after entering the break, I have here is Windows, and Mac icons may be somewhat different. Simply say eight places in the figure marked:

  ① start the service in Debug mode, a button to the left is based on the Run mode is activated. In development, I usually started directly Debug mode, at any time convenient debugging code.

  ② breakpoints: line numbers in the left column, click the left button or shortcut keys Ctrl + F8 marked / cancel a breakpoint, the breakpoint line color can set themselves.

  Debug window ③: After the access request reaches the first breakpoint, Debug window is automatically activated. If not activated, can be provided to set in, as shown in FIG 1.2.

  ④ Debugging button: a total of eight buttons, commissioning of the main functions of these buttons will correspond, hovering over the button to view the corresponding shortcut keys. The same can be found in the corresponding function in the menu bar Run in Figure 1.4.

  ⑤ service button: Here you can shut down / start the service, set breakpoints and so on.

  ⑥ method call stack: It shows all the methods through which the thread debugging, check [Show All Frames] button in the upper right corner, methods other libraries will not be displayed, otherwise there will be a lot of methods.

  ⑦ Variables: variable in the variable region can be viewed within the current method before the current breakpoint.

  ⑧ Watches: watch variables, you can Variables Variables in drag Watches View 

  

 

 

Transfer: https://www.cnblogs.com/chiangchou/p/idea-debug.html#_label0

Guess you like

Origin www.cnblogs.com/banml/p/11945160.html