문제

I am working on a web project and Debug options like 'Watch' and 'Inspect' are not working in My eclipse. In both cases it says variable cannot be resolved.

Environment

IDE: My Eclipse Version: 8.6.1 Build id: 8.6.1-20101117

OS Windows 7 Version 6.1 (Build 7600)

Java SE Runtime Environment (build 1.6.0_16-b01)

Interesting thing is these options works fine on other Web and Standalone projects

See screen for error details. Has anyone encountered such a problem? Kindly help how to resolve this

enter image description here

enter image description here

도움이 되었습니까?

해결책

I have checked the Java >> Compiler options from Windows >> Preferences menu and option of 'Add variable attribute to generated class file' was unchecked. I have enable that option and this resolves the issue. Now 'Watch' and 'Inspect' are working fine in my particular web project. See screen shot

enter image description here

I am not sure why this why enabling this option is necessary because in all other projects (in same workspace) debugging is working fine with this option disabled. Can anyone explain?

다른 팁

The execution of your code has not reach the point where your variable "value" is instanciated. Press F6 twice (to execute the next 2 lines) and you will see your variable's value.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top