简体   繁体   English

在IntelliJ中调试时实时更改变量?

[英]Changing variables in realtime when debugging in intellij?

When debugging in eclipse, I believe you are able to change the value of a variable in the source and have it update in realtime without setting breakpoints or anything. 我相信在Eclipse中调试时,您可以更改源中变量的值,并可以实时更新它,而无需设置断点或其他任何东西。 I was wondering if the same was possible in intellij? 我想知道intellij是否可能做到这一点?

Same question but for eclipse. 同样的问题,但日食。

You can reload classes while running your program in Debug mode and changes in code will apply if possible (there are limitations) without restarting the program. 您可以在调试模式下运行程序时重新加载类 ,并且如果可能(存在限制),将应用代码更改,而无需重新启动程序。

To reload changed classes 重新加载更改的类

Do one of the following: 请执行以下任一操作:

  • On the main menu, choose Run -> Reload Changed Classes. 在主菜单上,选择运行->重新加载更改的类。
  • On the main menu, choose Build -> Compile "class_name" to recompile an altered class during debug. 在主菜单上,选择Build-> Compile“ class_name”以在调试过程中重新编译更改的类。

Not aware about any other method to change the value of a variable "in real-time". 不知道“实时”更改变量值的任何其他方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在eclipse中调试时实时更改变量? - Changing variables in realtime when debugging in eclipse? 在 IntelliJ IDEA 中调试时,如何防止线程挂起时变量受到影响? - When debugging in IntelliJ IDEA, how do I prevent variables from being affected while the thread is suspended? 使用IntelliJ IDEA进行调试时,如何在JSP中解析Spring模型变量? - How do I resolve Spring model variables in a JSP when debugging with IntelliJ IDEA? 在调试外部应用程序时将IntelliJ定向到源 - Directing IntelliJ to sources when debugging an external application 在Intellij中调试TestNG时需要运行@BeforeSuite - Need to run @BeforeSuite when debugging TestNG in Intellij 使用IntelliJ IDEA调试Java时如何可视化整个矩阵? - How to visualize an entire matrix when debugging Java with IntelliJ IDEA? 使用IntelliJ IDEA进行调试时,不同的变量颜色是什么意思? - When debugging with IntelliJ IDEA, what do the different variable colors mean? System.getenv()仅在调试IntelliJ插件时正常工作 - System.getenv() only works properly when debugging IntelliJ plugin 远程调试tomcat时Intellij断点未命中 - Intellij break point does not hit when remote debugging tomcat IntelliJ中的Java IDEA:如何在调试时查看变量值? - Java in IntelliJ IDEA: How to view the variable value when debugging?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM