Skip to content

"continue" response sent after the following "stopped" event - should be opposite #134

Closed

Description

@offer8
  1. Put 2 breakpoints (e.g lines: 28, 38) in Java method
  2. Stopped a the first breakpoint - OK as expected
  3. Sent "resume" command
  4. Sometimes the "continue" response sent after the following "stopped" event - so our debugger client doesn't stopped at second breakpoint.

Following is the log:
2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR {"command":"continue","type":"request","seq":"17","arguments":{"threadId":13}}

2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR 18/12/2017 11:38:53.398 - [com.microsoft.java.debug.core.EventHub.lambda$start$28] - [FINE] -

2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR JDI Event: BreakpointEvent@com.company.mta123.simple.HelloServlet:38 in thread http-nio-0.0.0.0-3000-exec-3
2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR 18/12/2017 11:38:53.399 - [com.microsoft.java.debug.
2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR 2017/12/18 11:38:53 core.protocol.AbstractProtocolServer.sendMessage] - [FINE] -
2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR [[EVENT]]
2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR Content-Length: 131
2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR {"event":"stopped","body":{"threadId":13,"reason":"breakpoint","allThreadsStopped":false,"type":"stopped"},"seq":25,"type":"event"}

2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR 18/12/2017 11:38:53.403 - [com.microsoft.java.debug.core.protocol.AbstractProtocolServer.sendMessage] - [FINE] -
2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR [[RESPONSE]]
2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR Content-Length: 118
2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR {"success":true,"request_seq":17,"command":"continue","body":{"allThreadsContinued":false},"seq":26,"type":"response"}

2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR 18/12/2017 11:38:53.476 - [com.microsoft.java.debug.core.protocol.AbstractProtocolServer.processData] - [FINE] -
2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR [request]
2017-12-18T13:38:53.48+0200 [APP/PROC/WEB/0]ERR

Another comment - standard logs are being printed to the stderr instead of stdout even though they are not errors.

Activity

  1. testforstephen commented on Dec 19, 2017

    @testforstephen
    Contributor

    I tried on VSCode, the order of sending the StoppedEvent and ContinueResponse doesn't matter.
    DA sequences [ContinueRequest, StoppedEvent, ContinueResponse] and [ContinueRequest, ContinueResponse, StoppEvent] both work.

    What debugger client are you using?

  2. testforstephen commented on Dec 19, 2017

    @testforstephen
    Contributor

    For logger issue, it's the log handler to control where to print the log. Can you share your Log Handler implementation (a class extends java.util.logging.Handler)?

  3. rotemso commented on Dec 19, 2017

    @rotemso

    We are implementing our own client on top of your debugger core.

    If the order of response doesn't matter - on what should we rely in our client in order to perform the resume operation in the UI?
    Currently we rely on successful response of 'continue' in order to reflect the operation to the user (as no 'continued' event is sent).
    As we want to reflect the user the real status of the debugee application - we don't mark the thread as resumed in UI until a succesful response is actually returned.

    When a following 'stopped' event arrives (from a second breakpoint, for example) we reflect in the UI that the thread was stopped in the appropriate location.
    But when the response of 'continue' arrives after the 'stopped' event, our client reflects this to the user by resuming the thread in UI (even though it is actually stopped in the debugee app).

  4. testforstephen commented on Sep 19, 2018

    @testforstephen
    Contributor

    this issue is fixed in 0.13.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions