java - Debugging JMock expectations -


when i'm in expectations block, can't inspect variables in eclipse debug. "errors during evaluation" in expressions window , "id cannot resolved variable" when right clicking on "id" variable.

for example< can't inspect dataquery:

dataquery dataquery = context.mock(dataquery.class); string id = "test";  content.checking(new expectations() {{     oneof(dataquery).getproperty(id); }} 

inside block, can hit f3 on id , takes me declaration. code working expected.

this known limitation reported here anonymous classes. discussed on so thread.

from comments on eclipse issue seems local final variables visible in debugger members of anonymous class object this. (i don't see in local workspace though):

those fields named val$<original_var_name>, if class compiled jdt compiler.

the comments hint jvmdi api (jvm debugger interface) limitation , not problem in eclipse:

i assume somewhere has asked feature, , assume told not possible using jvmdi api... ?


Comments