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 212735 - Invalid Breakpoint in GlassFish Web Project
Summary: Invalid Breakpoint in GlassFish Web Project
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.2
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-19 08:23 UTC by bht
Modified: 2012-05-31 13:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test case (10.30 KB, application/x-zip)
2012-05-19 08:23 UTC, bht
Details
Test Java program (645 bytes, text/x-java)
2012-05-29 15:18 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bht 2012-05-19 08:23:22 UTC
Created attachment 119641 [details]
Test case

How to reproduce:

- Start GlassFish in Debug mode
- Open the attached Maven project
- Open HomePage.java
- Set breakpoint on first line in method
  public static void checkIfPageStateless(Page page) {
  on
  if (!page.isPageStateless()) {
- In Projects Window, right click on project node|Debug| and select GlassFish server permanently
- the debugger breaks on the breakpoint fine - resume
Result:
LineBreakpoint HomePage.java : 91 successfully submitted.
User program running
Breakpoint hit at line 91 in class com.mycompany.HomePage by thread http-thread-pool-8080(5).

- In mentod public DetailForm(String id, IModel<String> model) {
  add two lines line so that all lines including the breakpoint after are pushed down by two lines
  
before:
			Button submitButton1 = new Button("submit1");//submitButton1 = new Button("submit1");
            add(submitButton1);
after:
            Button submitButton1 = new Button("submit1");
            //submitButton1 = new Button("submit1");
            
            add(submitButton1);
  
- debug the project as above.

Result:

Thread http-thread-pool-8080(5) stopped at HomePage.java:91.
User program running
Not able to submit breakpoint LineBreakpoint HomePage.java : 93, reason: No executable location available at line 91 in class com.mycompany.HomePage.
Invalid LineBreakpoint HomePage.java : 93
Comment 1 Martin Entlicher 2012-05-29 15:18:23 UTC
Created attachment 120001 [details]
Test Java program

This can be reproduced with an ANT J2SE program as well.
The steps are:
1) Create an JavaApplication project and copy this attached class over the created one.
2) Submit a line breakpoint to line 25.
3) Debug the project.
4) After it stops on the breakpoint, add an empty line after line 22.
5) The breakpoint is correctly moved.
6) Now save the file and apply code changes.
7) Add one more empty line after line 23.
8) The breakpoint jumps to the test method declaration.
9) Undo the change (press CTRL-Z)
10) The breakpoint becomes broken.
Comment 2 Martin Entlicher 2012-05-29 15:23:25 UTC
Fixed by changeset:   223028:bab19f4f36e5
http://hg.netbeans.org/main/rev/bab19f4f36e5
Comment 3 Quality Engineering 2012-05-30 05:30:27 UTC
Integrated into 'main-golden', will be available in build *201205300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bab19f4f36e5
User: mentlicher@netbeans.org
Log: #212735: Prevent from updating breakpoints based on partially updated changed lines.
Comment 4 Jiri Kovalsky 2012-05-31 13:31:52 UTC
Product Version: NetBeans IDE Dev (Build 201205300001)
Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21
System: Linux version 3.0.0-12-generic running on amd64; UTF-8; cs_CZ (nb)
User directory: /home/cesilko/.netbeans/dev
Cache directory: /home/cesilko/.cache/netbeans/dev

Verified.