Eclipse code snippet editing test window

xiaoxiao2021-03-06  13

OS: WindowsXP SP1

JDK: 1.4.2

1. Code segment editing test window introduction: JDT (Java Development Tool in Eclipse) adds a code snippet editing test window, which can be used to test and evaluate the Java code snippet before building a complete Java program. From the Java Code Dram Editing Test window editor, you can select the code snippet, the results are evaluated and the results are displayed in a string, and the objects generated to the code snippet value can be displayed in the debugger expression view. And allows you to run, check, and display Java expressions, breakpoints, and abnormal behaviors under the control of the debugger. After the code snippet editing the test window page, the JVM is initiated when the expression is evaluated in it. The JVM of the page will remain active until the "Stop Assess" button explicitly shut down, terminates the page, or when the system.exit () is evaluated. 2. "File" - "New" - "Other", appears: Select "Code Dischart Editing Test Window", click Next. 3. Generate File "HelloWorld.jpage", open, you can test the code snippet in the editor. For example, in the input system.getProperties (), check right click, select "Check" in the pop-up menu, the check results are displayed in the pop-up window: You can also check the results like the variables in the debugger (for example, The progeny of the result can be expanded). 4. Expression results can be displayed. Enter 100 16, select "Show" in the first click on the menu, resulting in the result: (int) 116. In fact, the result is two cases: If it is a basic data type (for example, int) evaluation, the result is the simple value in the result, and other objects are values ​​obtained by sending toString to the result of the value. .

This is a good tool for code snipping debugging.

转载请注明原文地址:https://www.9cbs.com/read-48259.html

New Post(0)