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.
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).
Created attachment 10912 [details] Screenshot of the dialog.
Created attachment 10913 [details] The example Test1.java
Created attachment 10914 [details] The example Test2.java
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.
We need confirmation from HIE.
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".
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
Verified in 200402241900.