I am running some program through StepRequest with following code.
EventRequestManager mgr = vm.eventRequestManager();
StepRequest st=mgr.createStepRequest(event.thread(),StepRequest.STEP_LINE,StepRequest.STEP_OVER);
st.setSuspendPolicy(EventRequest.SUSPEND_ALL);
st.enable();
On StepEvent
I am getting location of StepEvent using
event.location().lineNumber()
.But the problem is, I am getting same line number for multiple StepEvents which should not be possible as I have given STEP_LINE
as parameter for creation of StepRequest
. But I can see those StepEvents
with same line number differ on calling
event.location().codeIndex()
I want to know why I am getting such unusual results.