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
- Linux Forum: Apache, Webmin and Mandrake - Linux Operating System Help
- Yahoo! Mail: Revenge of the Oddpost
- Free AS400 & iSeries Software Tools & Utilities Downloads
- The Laughing Boardroom video...a real world example!
- IBM eServer iSeries - The Laughing Boardroom
- Basic Requirements of a JavaServer Faces Application
- UDATE and *DATE in AS400 RPG
- AS400 APIs
- Fast-track your Web apps with Ruby on Rails
- Encrypt Data on as400 (QC3ENCDT, Qc3EncryptData)
No comments:
Post a Comment