Bug 23295 - [breakpoints] Move/copy breakpoints and retain conditions
Summary: [breakpoints] Move/copy breakpoints and retain conditions
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement with 19 votes (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
: 15001 25192 71897 98288 163819 165486 193755 199604 211758 281048 321034 336627 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-09-07 15:02 EDT by Jed Anderson CLA
Modified: 2021-10-06 04:48 EDT (History)
32 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jed Anderson CLA 2002-09-07 15:02:00 EDT
It would be helpful for me to be able to move a breakpoint.  I work with many
conditional breakpoints that I often want to move.  Currently that means opening
the breakpoint properties dialog, copy the conditional, make a new breakpoint,
open the breakpoint properties dialog, paste the conditional.

Possible implementations of this (would be nice to have all of them):

1. Drag and drop of the breakpoint in the editor.
2. Editable line number in breakpoint properties page.
3. Copy/paste feature for breakpoints, i.e. select breakpoint, copy, paste,
dialog prompts for new location.
Comment 1 Darin Wright CLA 2002-09-09 12:00:02 EDT
1 & 2. dup of bug 15001

3. New feature request

Marking 15001 as a dup of this bug.
Comment 2 Darin Wright CLA 2002-09-09 12:00:42 EDT
*** Bug 15001 has been marked as a duplicate of this bug. ***
Comment 3 Darin Wright CLA 2002-09-09 12:01:08 EDT
Marking as later
Comment 4 Darin Wright CLA 2002-10-22 10:37:15 EDT
*** Bug 25192 has been marked as a duplicate of this bug. ***
Comment 5 Jared Burns CLA 2004-08-12 15:42:03 EDT
*** Bug 71897 has been marked as a duplicate of this bug. ***
Comment 6 Darin Wright CLA 2005-06-03 10:59:42 EDT
*** Bug 98288 has been marked as a duplicate of this bug. ***
Comment 7 Adam Kiezun CLA 2005-11-04 11:37:38 EST
is this going to happen?
it's very frustrating when I specify a complex condiion in the breakpoint that I
cannot move it (or save it - but that's another bug)

the line number property should be editable from the 'breakpoint properties' dialog.
Comment 8 Darin Wright CLA 2006-06-14 11:36:33 EDT
*** Bug 20597 has been marked as a duplicate of this bug. ***
Comment 9 Darin Wright CLA 2006-11-08 11:23:28 EST
*** Bug 163819 has been marked as a duplicate of this bug. ***
Comment 10 Darin Wright CLA 2006-11-22 12:52:57 EST
*** Bug 165486 has been marked as a duplicate of this bug. ***
Comment 11 Michael Rennie CLA 2007-05-23 10:36:15 EDT
reopening
Comment 12 Darin Wright CLA 2007-06-21 11:41:42 EDT
*** Bug 193755 has been marked as a duplicate of this bug. ***
Comment 13 Darin Wright CLA 2007-08-10 12:30:30 EDT
*** Bug 199604 has been marked as a duplicate of this bug. ***
Comment 14 Darin Wright CLA 2007-12-03 10:23:53 EST
*** Bug 211758 has been marked as a duplicate of this bug. ***
Comment 15 Darin Wright CLA 2009-06-22 10:09:46 EDT
*** Bug 281048 has been marked as a duplicate of this bug. ***
Comment 16 Darin Wright CLA 2010-07-27 11:32:16 EDT
*** Bug 321034 has been marked as a duplicate of this bug. ***
Comment 17 David M. Karr CLA 2010-08-06 15:40:24 EDT
There's an additional reason to want this kind of functionality.

I use the JD-Eclipse plugin for decompiling bytecode.  With this, I can step through decompiled code, although somewhat awkwardly.  The decompiled code gets
margin comments with the original line numbers, which won't correspond to the line numbers in the resulting decompiled source.  I quite often have to scroll through the file each time I step over a line, as it tries to make itself view the current line number, which is in a different place in the file.

What's even more awkward is trying to set breakpoints in the decompiled source.  For instance, if I want to set a breakpoint on (original)line 212 in a class, I have to scroll down to line 212 in the decompiled source and hope for two things:

* The file is actually that long. If the file is shorter than that, I can't set the breakpoint.
* There is a breakpoint-able line of code on that line in the decompiled source.  If it's not valid for breakpoints, I can't set the breakpoint.

If I could set breakpoints on a line number entered by me, or change the line number on an entered breakpoint, then I could get around this problem.
Comment 18 Michael Rennie CLA 2011-02-09 09:28:12 EST
*** Bug 336627 has been marked as a duplicate of this bug. ***
Comment 19 Pawel Piech CLA 2011-06-03 11:42:39 EDT
I don't think we have generic APIs to implement this kind of feature, it'd have to be done by individual debuggers.
Comment 20 Michael Rennie CLA 2011-06-06 13:22:07 EDT
(In reply to comment #19)
> I don't think we have generic APIs to implement this kind of feature, it'd have
> to be done by individual debuggers.

We do now have bp condition histories, which would mitigate problem of losing complex conditions in the event the bp had to be removed / replaced.
Comment 21 Markus Keller CLA 2011-06-06 14:13:47 EDT
(In reply to comment #20)
The bp condition history only helps if the condition was recently changed. But if you want to enable an older breakpoint and the underlying source has been changed since you created it, you still have to copy/paste the condition.

An editable line number in the Properties dialog would be easy to do. DND of breakpoints in the editor ruler would need more support from the editor, see AbstractTextEditor#getRulerMouseListener().

(In reply to comment #19)
> I don't think we have generic APIs to implement this kind of feature, it'd have
> to be done by individual debuggers.

I think the most common use case is to move an ILineBreakpoint by a few lines while retaining all other properties of the bp. I think this would be interesting in all kinds of languages, not only in Java.
Comment 22 Pawel Piech CLA 2011-06-07 00:23:53 EDT
> (In reply to comment #19)
> > I don't think we have generic APIs to implement this kind of feature, it'd have
> > to be done by individual debuggers.
> 
> I think the most common use case is to move an ILineBreakpoint by a few lines
> while retaining all other properties of the bp. I think this would be
> interesting in all kinds of languages, not only in Java.

I don't disagree, it's just how our debugger APIs are structured.  Except for the generic toggle breakpoint actions (ctrl-shift-B), the individual debugger implementations are responsible for supplying all other breakpoint creation and editing actions.  
For example in Wind River's debugger we do allow users to change the BP line number in the breakpoint properties view.  I don't know if users really care about it though.  DND would be much more useful.
Comment 23 Julio Carlos Barrera CLA 2013-02-13 04:59:05 EST
what about this feature request. Will be implemented?
Comment 24 Dani Megert CLA 2013-02-13 05:02:19 EST
(In reply to comment #23)
> what about this feature request. Will be implemented?

Not at this point.
Comment 25 Julio Carlos Barrera CLA 2013-02-13 05:05:50 EST
Could be in the next big release, Kepler? It is a requests since 2002... It would help many developers
Comment 26 Dani Megert CLA 2013-02-13 05:08:13 EST
(In reply to comment #25)
> Could be in the next big release, Kepler? It is a requests since 2002... It
> would help many developers

Only if someone provides a high quality patch.
Comment 27 Marek Andreansky CLA 2020-10-14 13:40:08 EDT
I do wonder, is this considered and will it ever be added?

Wanted to move a breakpoint, was hopeful when I saw the input field in the ide. But it was locked.

Does seem people are still searching for it and could use it https://stackoverflow.com/questions/14850620/how-can-i-move-a-conditional-breakpoint-in-eclipse