|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
Debugger not recognizing code changesI'm getting some odd
behavior from the debugger in a large NetBeans 6.1 web application that was
imported from JBuilder. The NetBeans debugger doesn't seem to recognize
when I've changed code. It will continue to stop on blank lines where a
previous breakpoint was set, and it marks as "Broken Breakpoint" lines that have
new, valid code on them.
It's like me and the
debugger (or the debugger and Tomcat) are working off two copies of the code --
one version, that Tomcat is running, is stuck the way it was; the other is
in the NetBeans editor and can be edited to my heart's content (though no
changes are reflected back to Tomcat.)
For example, if I
have a servlet class that runs fine, I can put a breakpoint at a particular
line. When I clean/build and run in debug mode, the program will stop at
that line, as expected. Then I stop tomcat, stop debugging and add a blank
line where my breakpoint was. NetBeans properly advances the marker to the
next line. But when I run the app again in debug mode, it stops at the
blank line, then stepping forward, it advances, but it's off by one line.
It behaves this way
even after I exit NetBeans and restart after making a change.
Rebooting doesn't change the behavior. Neither does eating Mint
Chocolate Chip ice cream, though that improved my spirits. I've also
managed to get this to happen on two different PCs, so whatever happened is
repeatable.
Is there something
amiss that will correct this behavior? It's pretty much a show-stopper
since effectively, I can't edit code. What things can I check to track
down the cause of this?
Any help would be
appreciated. I'm using Netbeans 6.1 on Windows with Tomcat
6.0.1
Dave
|
|
|
RE: Debugger not recognizing code changesI found the cause of this problem. I’ll
see if I can explain it for posterity (and the amusement of people smarter than
me): The gist of it is that there were duplicate
class files in the classpath. They appear to have gotten there
because … and here’s where I get a little lost … the
<project folder>/web folder contained what looks like the contents of the
application’s .war file from the previous IDE. That includes
WEB-INF/classes with all the classes. When NetBeans was building the project, I
guess it was cleaning out the dist directory, compiling my classes (with the
current content), then copying over all the stuff from the .web/ folder, which
included the older versions of the classes from the ./web/WEB-INF/classes
directory. Once I removed all the .class files from the
.web/ directory things started working again as expected. Dave From: nbusers-return-122928-dbender=umn.edu@...
[mailto:nbusers-return-122928-dbender=umn.edu@...] On Behalf Of Dave Bender I'm getting some odd behavior from the debugger in a large
NetBeans 6.1 web application that was imported from JBuilder. The
NetBeans debugger doesn't seem to recognize when I've changed code. It
will continue to stop on blank lines where a previous breakpoint was set, and
it marks as "Broken Breakpoint" lines that have new, valid code
on them. It's like me and the debugger (or the debugger and Tomcat)
are working off two copies of the code -- one version, that Tomcat is
running, is stuck the way it was; the other is in the NetBeans editor and
can be edited to my heart's content (though no changes are reflected back to
Tomcat.) For example, if I have a servlet class that runs fine, I can
put a breakpoint at a particular line. When I clean/build and run in
debug mode, the program will stop at that line, as expected. Then I stop
tomcat, stop debugging and add a blank line where my breakpoint was.
NetBeans properly advances the marker to the next line. But when I run
the app again in debug mode, it stops at the blank line, then stepping forward,
it advances, but it's off by one line. It behaves this way even after I exit NetBeans and restart
after making a change. Rebooting doesn't change the behavior.
Neither does eating Mint Chocolate Chip ice cream, though that improved my
spirits. I've also managed to get this to happen on two different PCs, so
whatever happened is repeatable. Is there something amiss that will correct this
behavior? It's pretty much a show-stopper since effectively, I can't edit
code. What things can I check to track down the cause of this? Any help would be appreciated. I'm using Netbeans 6.1
on Windows with Tomcat 6.0.1 Dave |
| Free embeddable forum powered by Nabble | Forum Help |