热代码交换不起作用,为什么? [英] Hot code swap is not working, why?

查看:151
本文介绍了热代码交换不起作用,为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试编写一个简单的一个类控制台应用程序时 - 没有问题。我可以在调试时更改方法中的代码。

When I'm trying to write a simple one class console app - there is no problem. I can change code in a method when debugging.

问题在于Jetty上的我的网络应用程序。它不起作用,也不仅仅是在通常的调试模式下(在eclipse中按下调试按钮),也不是在远程调试模式中描述在一起。我可以调试,但不能改变,即使通常不是静态方法,例如添加sysout,我的意思是我可以更改它但保存后它没有更新,它的工作原理与之前相同。

The problem is with my web apps on Jetty. It's not working nor just in usual debug mode(pressing a debug button in eclipse) nor in remote debug mode described here. I can debug but can't change even usual not static methods, like adding sysout for example, I mean I can change it but after saving it's not updated and it works the same as before.

另外,我和我的同事交谈过,它适用于他们,但是他们使用的是Spring Tool Suite版本的eclipse,我试过并得出结论,它在最新版本的STS中可以在通常的调试模式下开箱即用,并且它没有在最新版本的Eclipse中工作。

Also, I talked to my colleagues, it works for them but they use Spring Tool Suite version of eclipse, I tried and concluded that it works in the latest version STS out of the box in usual debug mode and it doesn't work in the latest version of Eclipse.

可能是什么原因?

推荐答案

基于我对问题的评论(由OP建议)回答:

Answer based on my comments to the question (as suggested by OP):

当您的工作空间或项目元数据损坏时,可能会发生奇怪的Eclipse行为。例如,当您升级Eclipse版本并使用旧版本创建的工作区时,就会发生这种情况。

Strange Eclipse behaviour can happen when your workspace or project metadata are corrupted. This can happen for example when you upgrade Eclipse version and use workspace created by the old version.

您应该尝试重新创建工作区并设置新项目结账。如果问题消失,您知道工作区元数据中有些可疑。

You should try to re-create your workspace and setup fresh project checkout. If the problem goes away, you know there was something fishy in the workspace metadata.

这篇关于热代码交换不起作用,为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆