Sometimes its useful to be able to run a piece of code to see if it does what you want without having a test case for it.
Eclipse makes this easy to do with its Scrapbook Page feature. To create a Scrapbook Page, New (Ctrl-N) -> Java -> Java Run/Debug -> Scrapbook page. This brings up an editor into which you can add snippets of java code which you can then execute by selecting them, RC->Inspect/Display/Execute
But did you know you could also debug the code you are executing from a scrapbook? Since the scrapbook actually runs the code in a jvm running in a debugger, all you have to do is set breakpoints at the locations you care about. This makes it extremely easy for one to figure out if a utility method is doing what it should (but you should really write a test case ;), or inspect the execution of some javadoc deficient thirdparty code to figure out what it actually does before you make your code depend on it
Monday, May 09, 2005
Subscribe to:
Post Comments (Atom)
Popular Posts
- Why Crunch Mode (Long Hours) Doesn't Work
- Common Gateway Interface (CGI) on the as400 / iSeries
- AS400 APIs
- What is QZHQSSRV job?
- About Me
- AS400 API - QCMDEXC - Execute Command
- Lawson Software acquired Intentia International for $480 million last week.
- Handy way of running PHP on a USB drive
- Using as400 QRCVDTAQ api to retrieve a message / entry from a dataqueue
- as400 api - Process Commands (QCAPCMD) API
No comments:
Post a Comment