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
- as400 Iseries Tips
- as400 iSeries NetServer Disabled user profiles
- opensourceCMS.com - Try before you install!
- AS400 API - QCMDEXC - Execute Command
- AS400 APIs
- Encrypt Data on as400 (QC3ENCDT, Qc3EncryptData)
- Creating an as400 Query
- Announcing the Preview Release of Ubuntu 5.10 (Breezy Badger)
- Why Crunch Mode (Long Hours) Doesn't Work
- Cool Make Project Photos
No comments:
Post a Comment