摘要:In debugging processes breakpoints are frequently used toinspect and understand the run-time program behavior. Althoughmodern development environments provide convenient breakpointutilities, it mostly requires considerable human effort to createuseful breakpoints. Before setting a breakpoint or typing abreakpoint condition, developers usually have to make somejudgements and hypotheses based on their observations andexperiences. To reduce such kind of effort, we propose an approachto automatically generating breakpoints for debugging. We combinethe nearest neighbor queries method, dynamic program slicing, andmemory graph comparison to identify suspicious program statementsand states. Based on this information, breakpoints are generated anddivided into two groups, where the primary group containsconditional breakpoints and the secondary group containsunconditional ones. We implement the presented approach on top ofthe Eclipse JDT platform. Our objective experiments and user studyindicate that the generated breakpoints can be effective in aiding debugging work.