This is quite possibly not an issue caused by SmartGWT, so please forgive me if it is not. I've searched elsewhere for answers to this issue but have not yet had any luck.
I thought I might be the only one experiencing this, but my colleagues have also noticed it, which made me think it might be our code or development environments that were somehow out of whack. However, while researching another issue with the latest nightly build and using only SDK sample code I noticed the same thing: the Chrome debugger will happily show me my Java code, but often refuses to set a breakpoint at the place I would like it to be - many times it will move it up or down a line or two, to the method's declaration, or will just not allow the breakpoint anywhere on or within a method.
I understand how my Java code is optimized during compilation and therefore code contained within conditions may be optimized to a single Javascript line. I am quite used to that and have no problem working around it. However, this is a fairly newly observed behavior (within the last couple of months) and is much more agitating.
For example, while debugging a slightly modified BuiltInDS project, I have the following lines in BuiltInDS.java
Has anyone else experienced this, or does anyone have any ideas what I might have misconfigured or otherwise incorrect in my environment? It is getting to the point that the debugger is less and less useful to me as it takes more time to work around the debugger's quirks than to use more brute-force methods to debug.
I thought I might be the only one experiencing this, but my colleagues have also noticed it, which made me think it might be our code or development environments that were somehow out of whack. However, while researching another issue with the latest nightly build and using only SDK sample code I noticed the same thing: the Chrome debugger will happily show me my Java code, but often refuses to set a breakpoint at the place I would like it to be - many times it will move it up or down a line or two, to the method's declaration, or will just not allow the breakpoint anywhere on or within a method.
I understand how my Java code is optimized during compilation and therefore code contained within conditions may be optimized to a single Javascript line. I am quite used to that and have no problem working around it. However, this is a fairly newly observed behavior (within the last couple of months) and is much more agitating.
For example, while debugging a slightly modified BuiltInDS project, I have the following lines in BuiltInDS.java
Code:
161 IButton filterBtn = new IButton("Filter"); 162 filterBtn.addClickHandler(new ClickHandler() { 163 public void onClick(ClickEvent event) { 164 boundList.filterData(fb.getCriteria()); 165 saveBtn.disable(); 166 } 165 }); 168 hLayout.addMember(filterBtn); 169 170 vStack.addMember(hLayout);
- If I place a breakpoint on line 164, the debugger accepts is briefly, but moves it to line 165.
- If I place one on line 165, the debugger moves it to line 163.
- If I place one on line 163, the debugger moves it to line 164.
- If I place one on line 168, the debugger moves it to line 170.
Code:
161 IButton filterBtn = new IButton("Filter"); 162 filterBtn.addClickHandler(new ClickHandler() { 163 public void onClick(ClickEvent event) { 164 int x = 1; 165 int y = 2; 166 y= y+x; 167 boundList.filterData(fb.getCriteria()); 168 saveBtn.disable(); 169 } 170 }); 171 hLayout.addMember(filterBtn); 172 173 vStack.addMember(hLayout);
Comment