Is there a way to launch methods written in Java from Eclipse without having to write all the driver code for it? I would like some effecient way of just right clicking a method, populating it with params and feeding it a debugger.
views:
78answers:
2
A:
This is not part of any standard eclipse plugin that comes in the stock package.
bmargulies
2010-02-27 22:30:35
+5
A:
The closest I can think of is the "scrap page" in eclipse. Don't think you can debug though.
If I were you, I'd use moreUnit plugin + JUnit (+ preferably maven). That way, you can not only write some tests quickly, but they will be organized so that you can have a nice unit test battery afterwards...
Enno Shioji
2010-02-27 22:44:29
I agree with Zwei here that JUnit is a good solution. You can select "File > New > JUnit Test Case" for a given class to have Eclipse generate all the skeletal code for a JUnit class. Then you just need to invoke your method with the parameters you want in the test method, and you have a ready-to-go test harness. Set a breakpoint and then right click on the JUnit test method and select "Debug As > JUnit Test"
kg
2010-02-27 23:00:25