View RSS Feed

My Java Tips

Hot Code Replace in Eclipse

Rate this Entry
by , 05-21-2011 at 11:41 PM (6361 Views)
Ever heard of hot code replace in reference to debugging in Eclipse? Well, its sure is a powerful and useful feature. It enables you to change code while debugging. It simply means that you may change the code in debug mode and see its affect.

Hot code replace is supported in 1.4 or higher VM. There are some changes like adding or deleting methods, class variables or inner classes which cannot be hot swapped. This depend on the support provided by a particular VM. This might also be supported in near future.

My practical experience is that, if you try editing, adding code in a method that is being currently executed, VM might complain:

Name:  vm-complains.jpg
Views: 1023
Size:  23.8 KB

I tried editing code in methods defined in different classes and also in a method that was not being executed at that debussing instance. Hot code replace worked. Please add your comments to this if you have some interesting findings.

Submit "Hot Code Replace in Eclipse" to Facebook Submit "Hot Code Replace in Eclipse" to Digg Submit "Hot Code Replace in Eclipse" to del.icio.us Submit "Hot Code Replace in Eclipse" to StumbleUpon Submit "Hot Code Replace in Eclipse" to Google

Tags: None Add / Edit Tags
Categories
Eclipse

Comments