>I read that NetBean have it, I try simple main code:
>
[quoted text clipped - 8 lines]
> reverse. so for this cases we need to change current value in watches
> window and change the source code for next run. it's true?
Most debuggers in most programming languages don't allow you to "step
backwards", or undo an operation. Imagine you wrote a CD burning program,
and you step over a function which burns data onto a CDR. You can't "step
back" to "unburn" the CD.
If all you want to do is change values of variables in memories, many
debuggers can do this. I don't use NetBeans, so I don't know what facilities
it provides, but in Eclipse, you can right click on the variable in the
"Variables" view, and select "Change value".
> but what we can do if have a complicate algorithm and have fix with
> some parameters, how we suppost to use with this featurse?
[quoted text clipped - 19 lines]
> Have some one to help? or have another group for NeBean
> Maybe have some another IDE with this feature?
I don't understand what you're asking, or what you're trying to do. I
don't know of any NetBeans specific newsgroup. Perhaps another reader here
can give you advice on NetBeans. Or you could try using Eclipse, and see if
it does what you want. Eclipse doesn't let you "step backwards" either
though. It does have a "drop frame" feature which essentially puts you back
to the beginning of the method you're currently running, but it doesn't undo
the side effects that may have occured so far (e.g. burning a CDR).
- Oliver
mtczx232@yahoo.com - 01 Jun 2006 16:31 GMT
this features save lot of time for rapid developers. I not like
MS-Access or VS2005-VB but all my friends stuck with this product
because this lack on best tools like Eclipse.
Oliver Wong - 01 Jun 2006 17:23 GMT
> this features save lot of time for rapid developers. I not like
> MS-Access or VS2005-VB but all my friends stuck with this product
> because this lack on best tools like Eclipse.
You're saying MS-Access or VS2005-VB allows you to unburn a CDR? I'd be
very surprised.
If you want to change a class definition, and reload it and pop to the
caller frame, as dimitar mentioned, the IDEA IDE supports it, as does the
Eclipse IDE. To activate it in Eclipse, just make your changes in the Java
source code and save it. Eclipse will automatically recompile the code, and
make the hot-swap if it's possible.
- Oliver
dimitar - 01 Jun 2006 16:59 GMT
With IDEA you can change a class, reload it and pop to the caller frame,
so you can enter again and debug the new definition of the method.
Beware that any global state change will not be reverted (but then it's
the same for VB).
There is a limitation that you cannot change a method signature or
add/remove new method (same as VB). Theoretically this limitation is not
enforced by the specification, but I'm not aware of any JVM that would
support it.
The whole hot-swap + drop frame functionality is provided from JPDA and
is not IDE specific, which means that it should be available in any IDE
with half-decent debugger. You'd have to read the manual to figure how
to trigger it.
Dimitar
Timo Stamm - 01 Jun 2006 20:56 GMT
dimitar schrieb:
> With IDEA you can change a class, reload it and pop to the caller frame,
> so you can enter again and debug the new definition of the method.
[quoted text clipped - 5 lines]
> enforced by the specification, but I'm not aware of any JVM that would
> support it.
I have heard that IBM VMs have better Hotswap support.
Larry Barowski - 02 Jun 2006 12:51 GMT
> dimitar schrieb:
>> With IDEA you can change a class, reload it and pop to the caller frame,
[quoted text clipped - 8 lines]
>
> I have heard that IBM VMs have better Hotswap support.
If I remember correctly, this will be added/improved in
Sun's 1.6 VM/JDI API.
dimitar - 02 Jun 2006 14:19 GMT
>>> There is a limitation that you cannot change a method signature or
>>> add/remove new method (same as VB). Theoretically this limitation is not
>>> enforced by the specification, but I'm not aware of any JVM that would
>>> support it.
> If I remember correctly, this will be added/improved in
> Sun's 1.6 VM/JDI API.
Does anybody know what will be added in 1.6? More preciselyly I'm
interested about:
* Private method addition to already loaded class (without overloading)
* Private method signature change/removal
* Non-private method addition (without overloading)
* Non-private method signature change/removal
* Superclass removal
IchBin - 02 Jun 2006 17:49 GMT
>>>> There is a limitation that you cannot change a method signature or
>>>> add/remove new method (same as VB). Theoretically this limitation is
[quoted text clipped - 11 lines]
> * Non-private method signature change/removal
> * Superclass removal
I have posted this before in this news group:
http://java.sun.com/developer/technicalArticles/J2SE/Desktop/mustang/#Swing
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
Timo Stamm - 02 Jun 2006 19:17 GMT
IchBin schrieb:
>>>>> There is a limitation that you cannot change a method signature or
>>>>> add/remove new method (same as VB). Theoretically this limitation
[quoted text clipped - 15 lines]
>
> http://java.sun.com/developer/technicalArticles/J2SE/Desktop/mustang/#Swing
Hm, I can't find any mention of better hotswap support on this page.
It looks like JSR 292 will get us a step further in this regard, but it
won't be available before Java SE 7.
Hotswap support certainly is an important issue that has got a lot of
attention lately: http://forum.java.sun.com/thread.jspa?threadID=572396
Java will probably never be able to get rid of the write/debug cycle as
well as Smalltalk did, but it is obvious that the current hotswap could
be greatly improved.
I encourage to vote on RFE:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4910812
Timo