Eclipse Java调试时无法在运行时编辑代码。

huangapple go评论76阅读模式
英文:

Eclipse java debug can't edit code while running

问题

抱歉,我只能返回中文翻译的部分,以下是您要的翻译内容:

我不确定是怎么发生的,但是我的Eclipse Java IDE中的许多设置都乱了。我猜这也是为什么在代码运行时进行更改不再起作用的原因。当我以调试模式运行它,进行一些更改并保存时,程序中并没有发生变化。如果我在代码运行时进行一些无法更改的操作,比如添加一个方法或一个字段,我也没有收到任何警告消息。有谁知道问题是什么?我可能可以重置所有设置,但我也有一些想保留的设置。

英文:

I'm not sure how it happened but a whole bunch of settings in my Eclipse java ide are messed up. I am assuming that this is also the reason why changing code while its running doesn't work anymore for me. When I run it in debug mode, change something and save it the changes are not happening in the program. I also dont get any warm messages if I do something that can't be changed while the code is running like adding a method or a field. Does anyone know what the problem is? I could probably reset all my settings but I also have some settings that I want to keep.

答案1

得分: 1

两件事要检查:

  1. 确保在项目菜单下选择了“自动构建”;
  2. 确保你正在使用1.4或更高版本的Java(窗口菜单 > 首选项 > Java > 已安装的JRE)。

Eclipse要求同时满足这两个条件才能执行热交换调试。

英文:

Two things to check:

  1. Ensure that Build Automatically is selected under the Project menu; and
  2. Make sure you're using Java version 1.4 or greater (Window menu > Preferences > Java > Installed JREs.

Eclipse requires both of these conditions in order to perform hotswap debugging.

huangapple
  • 本文由 发表于 2020年8月22日 08:16:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/63531448.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定