'Is there any way to save breakpoints in IntelliJ and restore later?

Can I define a set of breakpoints, and save this definition in IntelliJ and restore later on?

Like I have breakpoints at line 40 and 50 for Class A. Can I save them, and later restore in any way?



Solution 1:[1]

You cannot save/restore breakpoints in IntelliJ, but if you want to work with different "groups" of breakpoints in different situations without having to enable/disable or delete them one by one, you can do that in the current version (IDEA 2016.3.1).

You can create named groups of breakpoints and enable/disable them as a group with a single click. https://www.jetbrains.com/help/idea/2016.3/working-with-groups-of-breakpoints.html

Solution 2:[2]

You can find all breakpoints in project-dir/.idea/workspace.xml -> <component name="DebuggerManager">. You can save their manually.

Solution 3:[3]

This feature is currently not available (not even in Intellij Cardea EAP).

However, there is an IDEA feature request up for this: http://youtrack.jetbrains.com/issue/IDEA-15540.

Want to up-vote the feature request ?

Solution 4:[4]

On Android studio you can select multiple break points -> Right click -> Move to group -> new breakpoint group.

After this you can enable/disable entire group just like importing previously saved breakpoints.

Solution 5:[5]

Since year 2021 you can do it by IDEA plugin Breakpoint Manager.

Solution 6:[6]

In ver14 component name is XDebuggerManager.

You must be careful about the breakpoint url, especially the path must have variable $PROJECT_DIR$.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sdecima
Solution 2 komelgman
Solution 3 Ashutosh Jindal
Solution 4 Vihaan Verma
Solution 5 Fofola
Solution 6 Nic