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.
Summary: | [65cat] Debug not picking up code change | ||
---|---|---|---|
Product: | java | Reporter: | Unknown <non_migrated_user> |
Component: | Project | Assignee: | Jan Jancura <jjancura> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | CC: | cyhelsky, kganfield, mentlicher, mmirilovic, ppis, tpavek |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Projects RiskDimensions is the Main one
Here's a project that I'm using. You can see the settings, but I can't give all sources |
Description
Unknown
2008-08-22 13:56:44 UTC
Not P1, you can compile the changed source file explicitly. You can set it to p2, if you like, but the problem is that NB is running a compile that doesn't match the source. That's a _real_ problem. I have to be able to trust the IDE. Isn't this issue 143455? Does it work if you wait a moment before starting debugger? BTW issue 143455 is already fixed. I don't have compile on save set, so why would waiting help? I didn't know you don't have Compile on Save set. That's why I asked. Without Compile on Save this is likely a different bug. Works fine for me. What kind of project do you have? I've tested with a "Java Application" project type. The best would be if you can zip the sample project and attach it to this issue. Thanks. I used the java class I included in the defect. Yes, I see. But this is not sufficient, the class file is a part of some project. I need the project type at least, or the whole sample project, if possible. The compilation before debugging does not depend on the class file, but on the project's build file. This is really a problem. It takes a while to set up a debugging session, then only to find out the debugger things there's a breakpoint on an invalid line. This is a project based on existing source. It is reproducable. Compile on save is off. O.K. I've tested that on regular Java projects. I'll verify how debugging on projects created from existing sources works. I've tried both standard j2se project and project with existing sources on Windows and Mac Os. It works fine with compile on save - switched on and off. For me too. If it's not possible to provide a complete sample project, please provide at least content of "nbproject" folder of your project. Low memory? I do notice that (tho no OutOfMemoryErrors are thrown) Attaching my projects Created attachment 69151 [details]
Projects RiskDimensions is the Main one
Doesn't seem to be low memory. Still happens when the NB session is new. (after everything has scanned, etc) Anything to do with the source compatibility flag? This problem has bitten me twice this morning. (in 1.5 hours) with Product Version: NetBeans IDE Dev (Build 200809020201) Java: 1.6.0_07; Java HotSpot(TM) 64-Bit Server VM 10.0-b23 System: Linux version 2.6.26-1.slh.3-sidux-amd64 running on amd64; UTF-8; en_US (nb) Userdir: /home/sasbeb/.netbeans/dev Still happens with: Product Version: NetBeans IDE Dev (Build 200809071401) Java: 1.6.0_07; Java HotSpot(TM) 64-Bit Server VM 10.0-b23 System: Linux version 2.6.26-1.slh.3-sidux-amd64 running on amd64; UTF-8; en_US (nb) Userdir: /home/sasbeb/.netbeans/dev With new module provided by: http://www.netbeans.org/issues/show_bug.cgi?id=143234 removing INCOMPLETE - Bryan provided the project Sorry, but the project http://www.netbeans.org/nonav/issues/showattachment.cgi/69151/project.tar.gz can not be used to reproduce this problem. There are no sources, nothing to debug. Just project files with unresolved dependencies, nothing real to work with. Can't you attach a simple project with the NewClass you've provided above? Do you mean that this can be reproduced also with http://www.netbeans.org/nonav/issues/showattachment.cgi/69998/MyWebApplication2.ZIP? I'm going to try that... Sorry, but with http://www.netbeans.org/nonav/issues/showattachment.cgi/69998/MyWebApplication2.ZIP all works fine for me. When I modify index.jsp, the page is updated on the next debug. When I modify some class file, I can see updated compiled class under build/web/WEB-INF/classes/... after I press debug. I've now compared RiskDimensions-d2rskd52/nbproject/build-impl.xml with a build-impl.xml of Java project created in NetBeans. All looks fine, there are no differences in the debugging session. One more question that might indicate something: Does the problem with sources not being compiled happens only when you run the project under debugger, or also when you run the project via plain "Run"? I can't give you my source. NewClass was just a new java class created in the project I gave you. It should be self explanatory Worksforme on: Product Version: NetBeans IDE Dev (Build 200809181401) Java: 1.6.0_07; Java HotSpot(TM) 64-Bit Server VM 10.0-b23 System: Linux version 2.6.25-9.slh.1-sidux-amd64 running on amd64; UTF-8; en_US (nb) Userdir: /home/tester/.netbeans/dev I've tried numerous variants: Changes between debugging sessions / in one debugging session(apply code changes) with saving / without saving the changes with compile on save turned on/off 8 variants in total, every time everything worked as expected. It seems to me the problem must be in some way project-specific. Closing as worksforme. Please reopen the issue when some reproducible scenario is found(preferably on some simpler project). If you can't reproduce it on any other project and can't give any workable sample, maybe you should try creating screencast as a last resort to give us at least some idea of what's going on? Hold on cowboy;) I have a fail case for both not picking up changes and Java Result : 1. I'll post my project and and 2 source files. You can't have all my source since it's a commercial app, but I can post my project settings and the 2 source files that I used to see that the debugger wasn't using my changes. Created attachment 70148 [details]
Here's a project that I'm using. You can see the settings, but I can't give all sources
You're not going to be able to resolve all the dependencies. They're sources and libraries I can't give you. Also, I tried creating a project using the sources in NBTest, but couldn't replicate it in such a small project. Could there be a problem with starting the debugger before the compile/scan has taken place for large projects? It's maddening, and as such, my only choice is to clean/build all in order to make sure the debugging session is using current sources. This of course makes NB run out of memory pretty fast. Again, in the sample project wjich you sent there is no problem, it is just programmed to throw IAE every time it is run - if you add: for (int i = 1; i<6; i++) { Foo.Bar b = new Foo.Bar(i,Integer.toString(i)) {}; } to the beginning of the main class the project would even bypass the exception and do what (i suppose) it is supposed to do. Again, there is nothing wrong in this project - i can make changes to the code and they are correctly accepted by debugger. The Riskdimensions project is alas unusable for testing purposes so i can only use the smaller one. -> Closing as worksforme. You can't close this as WORKSFORME when I can clearly replicate the problem. If you had a project of any size, you'd see it. sasbeb, since you can reproduce the problem, can you please try to do "Run" instead of Debug and see if the changes were applied? If the same steps that led to unapplied changes can be reproduced with Run? That would at least give us some hint. Thank you. It happens with both run and debug. O.K. Thanks a lot. Then it can not be a debugger issue. Moving to ANT for evaluation, since ANT compiles the sources. Well, for example I frequently debug part of netbeans, which is IMHO big enough (true, it is different kind of project, not java application, but netbeans module, but if the size is the problem this should not matter). Please try to understand my position: - We know you have problem on big proprietary project, but we don't have it so we cannot get to the core of the problem. - We tried every other project you send us on many platforms (now finally even including Debian Sidux on 64-bit AMD) - We can't reproduce the problem, the changes in code are accepted and it works correctly as it should. - Unless we are given some reproducible test case we simply can't do anything. Can you please try this on latest NB build if the problem is still there (as we are testing on latest builds) so that we don't talk apples and oranges. This is on today's build. Product Version: NetBeans IDE Dev (Build 200809181401) Java: 1.6.0_07; Java HotSpot(TM) 64-Bit Server VM 10.0-b23 System: Linux version 2.6.26-1.slh.3-sidux-amd64 running on amd64; UTF-8; en_US (nb) Userdir: /home/sasbeb/.netbeans/dev I can't reproduce it on a small project. I'll keep trying. No known way to reproduce, not affecting others that I know of. Possibly an Ant problem but no clear indication so far that this is so. Assigning to j2seproject pending a test case. Keep in mind that this project was brought forward from 6.0-> 6.1-> 6.5beta/dev Also that it doesn't fail (Java Result : 1) running with 6.0 or 6.1. There is too many comments but no much info available. 1) The changed java class, which is not up to date, is a part of the main project (the project you called debug on), right? 2) Does turning on Track java dependencies help? Not a solution just a test. 3) If you are able to reproduce it, can you attach the ant debug output, there should be logged which files Ant treats as modified. I will also need to know the name of the java file you have changed. Thanks. incomplete for a several months -> closing. It's still reproducable (tho not consistently) Read http://wiki.netbeans.org/IssueLifeCycle, please. incomplete for a several months -> closing. Bummer. Should I revert back to 6.0/6.1 where it didn't exist? If I have 1000+ files in 4 projects (1 main and 3 sub projects) I can't trust the debug session without a clean/build all. Sasbeb, can you answer tzezula questions, please? We are not able to help you otherwise. |