Issue with event request ids in jdwp

129 views Asked by At

I've been trying to write a java bytecode debugger in C# and have run into an annoying problem . I set an event request (breakpoint, single step, etc...) and when java replies back that an event was raised, the event request id that it says generated the request is not even close to correct (unless I am misreading the documentation).

I start my command packet Ids at 100 and java will say that the request id of the command packet that generated the event is 2. I can confirm I am sending the correct id of the command packet because when java replies back to my event set request, it replies to the request id I am expecting.

The documentation says that the request id of an event is the "request that generated event", which seems to me that that should be the id of the event set command packet, but maybe (hopefully) I am wrong. Does anyone have an idea as to what's up with this?

1

There are 1 answers

0
ptsoccer On

Argh I feel so stupid. I thought the debugee was sending the requestId of the packet I sent it, but it turns out I didn't see the reply data for the event set request, which is of course the requestId that the debugee created for the event.