How can I change the value of a variable while debugging Java code in NetBeans 7.1?

纵然是瞬间 提交于 2019-12-04 05:05:29

It is also possible to change the value of the primitive variables and Strings in-place in the Value column of Variables window. To change values of Object variables, you can use "Evaluate Expression..." under menu Debug option (Ctrl+F9).

You can apply your code changes through your debug session simply by selecting Apply Code Changes under the Debug menu. Thanks to this feature, you can debug code, make fixes, and then continue debugging without restarting the application.

If you want to apply your code changes automatically when you save changes to JAVA code while debugging, from the the "Tools" menu, you select "Options", then click the "Java Debugger" tab, then check the "Apply code changes after save" and then press "OK".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!