This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 34820 - Fix and continue - Use Old misbehaviour
Summary: Fix and continue - Use Old misbehaviour
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Linux
: P2 blocker (vote)
Assignee: Maros Sandor
URL:
Keywords: UI
Depends on:
Blocks:
 
Reported: 2003-07-09 14:11 UTC by Jan Lahoda
Modified: 2004-02-25 10:21 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot of the dialog. (10.76 KB, image/png)
2003-07-09 14:12 UTC, Jan Lahoda
Details
The example Test1.java (459 bytes, text/plain)
2003-07-09 14:14 UTC, Jan Lahoda
Details
The example Test2.java (518 bytes, text/plain)
2003-07-09 14:14 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2003-07-09 14:11:45 UTC
NB200307090100, JDK1.4.2-b28 (on JDK1.4.1-b21 the
behaviour is different because of some JDK bug), MDI.
Imagine that you are debugging a method (the
program counter is inside the method), and you
wish to fix&continue it. After calling
Debugger/Fix, a dialog "Pop Call" or "Use Old" is
shown. Choose "Use Old". Execute "Step Over" (F8)
action. The attached dialog about missing source
is shown.
What I dislike on this behaviour is that the user
is lost. He/She does not preciselly know what this
means.
Please note, that the content of the editor can be
totally different to the code that is currently
being executed.
I am asking for evaluation how to deal with this
problem. I see following possibilities:
1. Do "Step Out" (as did previous versions due
some bug in the JDK)
2. Provide the user an informational dialog saying
that he/she cannot continue stepping in this
method (and offer "Step Out")
3. Something else (but I do not think it is
possible to continue stepping in this method).

I am also attaching a test case(Test1.java,
Test2.java, package examples). You can see the
described behaviour following these steps:
1. Add a breakpoint at line 20 of Test2
2. Run Test1 in the debugger and wait until the
debugging is stopped at line 20 in Test2.
3. Change a text in any "System.err" of the
current method.
4. Execute "Debug/Fix".
5. Click on "Use Old" in the dialog.
6. Execute "Step Over" action (F8).
Comment 1 Jan Lahoda 2003-07-09 14:12:45 UTC
Created attachment 10912 [details]
Screenshot of the dialog.
Comment 2 Jan Lahoda 2003-07-09 14:14:02 UTC
Created attachment 10913 [details]
The example Test1.java
Comment 3 Jan Lahoda 2003-07-09 14:14:29 UTC
Created attachment 10914 [details]
The example Test2.java
Comment 4 Maros Sandor 2003-12-04 14:04:24 UTC
I suggest putting up a dialog saying "You modified code in the 
current method, the debugger will step out" with an OK button. The 
debugger will then step out. I think that providing the user with 
more options will only confuse him.
Comment 5 Maros Sandor 2004-01-07 10:10:09 UTC
We need confirmation from HIE.
Comment 6 jrojcek 2004-01-09 10:24:51 UTC
So, lets do the following if a method containing the program counter is fixed:

Provide the user with two options - either pop call from the stack or use the old call 
and automatically step out from the modified method. This requires two changes:

- the Old Call on Stack dialog is shown only if the method containing the program 
counter is modified before Fix is invoked. Currently the dialog shows up also if any 
method from the class is fixed.
- change the wording of the dialog to: "The most recent call on the stack is associated 
with one of the methods that you fixed. To remove this call so that the fixed method 
is called, click the Pop Call button. Otherwise, click the Use Old and Step Out button." 
The button labels would be: "Pop Call", "Use Old and Step Out".
Comment 7 Maros Sandor 2004-01-09 10:57:04 UTC
The dialog only pops up if the method containing PC is modified and 
text in the dialog and buttons were adjusted according to UI spec.

/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/Bundle.proper
ties,v  <--  Bundle.properties
new revision: 1.64; previous revision: 1.63
/cvs/debuggerjpda/src/org/netbeans/modules/debugger/jpda/FixActionImpl
.java,v  <--  FixActionImpl.java
new revision: 1.15; previous revision: 1.14
Comment 8 Jan Lahoda 2004-02-25 10:21:16 UTC
Verified in 200402241900.