什么代码更改会自动反映在eclipse中的调试模式? [英] What code changes are automatically reflected in eclipse in debug mode?

查看:98
本文介绍了什么代码更改会自动反映在eclipse中的调试模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用eclipse(写,调试)作为IDE。在调试模式下,当我进行一些更改,如初始化一个局部变量,它们将自动反映。



但其他更改,如更改静态变量的值;有时我会收到一条消息说我需要重新启动虚拟机,有时候我不会。



现在的问题是什么样的更改会自动反映,什么不



我使用远程调试,但是从eclipse运行程序时会有什么区别吗?

解决方案

这不是IDE的功能,而是远程调试的VM功能。 VM现在可以处理变量初始化器方法中的逻辑简单变化,但不能用改变的类结构来处理。



重新加载正常处理,当你的类结构不会更改:您不会删除或添加成员,方法或内部类,因为添加成员或内部类会更改为类内存分配的大小。方法不会改变内存大小,但是改变它们的结构。



这里你可以找到一些解释。


I use eclipse (to write, debug ) as an IDE. In debug mode when I make some changes,like initializing a local variable, they are reflected automatically.

But other changes like changing the value of a static variable; sometimes I get a message saying I need to restart the VM and sometimes I don't.

Now the question is what sort of changes are automatically reflected and what doesn't.

I use remote debugging, but will be there any difference when running the program from eclipse?

解决方案

It is not the IDE feature, but VM feature of remote debugging. VM now can handle simple changes in logic inside the methods of variable initializers, but can't treat with changed class structure.

The reloading is treated normally, when your class structure doesn't change: you don't remove or add members, methods or inner classes, because adding members or inner classes changes the size of allocated for the class memory. Methods doesn't change the memory size, but changes their structure.

Here you can find some explanations.

这篇关于什么代码更改会自动反映在eclipse中的调试模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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