• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is there an IDE that allows code to be changed on the fly?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I'm migrating from C#.

One thing I can do in Visual Studio Express is add/delete or modify a line ( in a method ) on the fly and continute debugging the program
without stopping.

Can I do this in any Java IDE?

Please see screen shot if you would like more clarification.


Cheers,

Andrew
image.JPG
[Thumbnail for image.JPG]
Image of me changing code in editor without having to stop debugger.
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CodeGuide used to do this. But I don't even know if it's still around.
 
Andrew Ground
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bear for moving my message to the correct forum
 
Andrew Ground
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Bear - just surfed - they are still around. I'm just emailling them for the cost. It's not free.
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You didn't say free.
 
Andrew Ground
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just highlighting to other users that it is proprietory.
I don't mind paying for the best functionality.
I'll be trying hard to find a free one though.
 
Andrew Ground
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anyone know the correct technical term for this "allowing code to be changed on the fly without having to stop and restart the debugger"?

 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe that CodeGuide termed this "on the fly compiling". Other possibilities (that I'm just pulling out of thin air): "instant compiling", "constant compiling", "just in time", and (my favorite) "MagiCode(tm)".

The latter one I've already trademarked. Hands off!
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the prevailing term is "edit and continue".

According to this, it's already possible via the JPDA. NetBeans has (or at least had) a "Apply Code Changes" or something like that, but I haven't used NetBeans in awhile.

Doing such things was always far more entertaining in Lisp, though.
 
Andrew Ground
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bear you cracked me up! Thank you.
 
Ranch Hand
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
NetBeans has "Apply Code Changes", but if the changes are too drastic, e.g. changing method name, arguments, etc, that feature won't work. For simple thing like changing the implementation of a method, that feature is pretty handy.

You should take a look at JRebel. It is a good product, but it's not free.
 
Andrew Ground
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you David and Freddy - I tried "Apply Changes" in netbeans - it works. ( C# is easier in my opinion ).

David you are right - Microsoft officially call it "Edit and Continue":
Edit and Continue

A few developers suggest it encourages sloppy coding:
Sloppy Coding

Freddy I came across JRebel in my searches. I haven't tried it yet - but it appears to allow very radical Edit and Continue.

During my searching on "Edit and Continue" I found this cool debugging technology - it allows you to go back in time through the state changes of the program.
It isn't Edit and Continue but it looks very useful.

Back-in-time debugging

Check out this video:
http://pleiad.dcc.uchile.cl/files/tod/tod-demo-lq.avi

Cheers,

Andrew
 
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Eclipse has this feature as well. Since it's ultimately based on the debugger that's built into the JVM, the behaviour and restrictions are essentially the same as in NetBeans. As they would be in most other IDEs. Go back a few months in this forum and there's a more complete discussion on how it works in Eclipse.

Dynamically mucking around in code while it's under the microscope has its risks, since you are able to create data contexts that basically have no relation to any fixed version of the source code (although some debuggers I've worked with essentially let you do anything you wanted up to running completely unrelated programs in the debugging space). On the other hand, if you take notes, it can save a lot of time. Getting substrings/subscripts to split at the proper point has always been a bit of a problem for me, but with on-the-fly recoding, I can tweak the stuff until I have it right. And then go set up some unit-tests to ensure that it stays right!

On the other hand, if your shop happens to harbour the sort of person who uses this facility to "kick-start" production applications: Person. Door. Push.
reply
    Bookmark Topic Watch Topic
  • New Topic