The invention discloses a method and
system for automatically generating dynamic breakpoints, wherein the
system comprises a dynamic dependence graph creation module, a debugging range refinement module, a state-flow graph creation module, a dynamic
breakpoint generation module and a debugging feedback collection module, wherein the dynamic
dependency graph creation module is used for not only collecting execution examples of program statements, but also collecting execution sequences and dependency relationship between the examples by utilizing a
dynamic instrumentation technique during the program execution process, so as to create a dynamic
program dependence graph on the bases; the debugging range refinement module is used for extracting parts of the dynamic
program dependence graph relevant with program failure descriptions by utilizing a program dynamic-
slicing technique; the state-flow graph creation module is used for interchanging connection points and sides in the dynamic dependence graph output by the debugging range refinement module and transforming a debugging range into a state-flow graph; the dynamic
breakpoint generation module is used for generating dynamic breakpoints and aggregations of expressions required being inspected at the breakpoints; and the debugging feedback collection module is used for collecting the results of judgments made by a user about the provided breakpoints and the aggregations of the expressions required being inspected at the breakpoints.