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
- Creating an as400 Query
- Library list for Web server
- ibm as400 manuals v5r4
- Encrypt Data on as400 (QC3ENCDT, Qc3EncryptData)
- AS400 Job Scheduler
- UDATE and *DATE in AS400 RPG
- OS/400 PASE Shells and Utilities
- CVS Respitory on as400 Iseries II
- AS400 APIs
- IBM WebSphere Developer Technical Journal: Maintain continuous availability while updating WebSphere Application Server enterprise applications
No comments:
Post a Comment