pkulchenko / MobDebug

Remote debugger for Lua.
Other
889 stars 192 forks source link

No response for set breakpoint command #70

Closed moteus closed 2 years ago

moteus commented 2 years ago

MobDebug does not send any response for set/del breackpoint commands during run (from handle_breakpoint function). Is it expected behaviour?

pkulchenko commented 2 years ago

Yes; it only sends responses to the commands when the app is suspended, as it was causing a breakage in the protocol.

Are you running into any problems with that?

moteus commented 2 years ago

Nope. Just not expected part of protocol.

moteus commented 2 years ago

I think I found a problem. Lets say Lua code stalled in some C call (e.g. sleep(5000)) so mobdebug can not handle any I/O. In this time user set 2 breakpoints. After C call ends handle_breakpoint are called and handle exactly one breakpoint and debug_hook interrupted because of the second set breakpoint command.And as result second command handled inside regular debug loop with response.

I am not sure that this may lead to any problems in IDE, but I see no relaible way to know either debugger response or not

pkulchenko commented 2 years ago

@moteus, yes, this may actually happen. To rephrase the scenario: the user sends to async breakpoints (not expecting a response), but the first one stops the application and when the second one is processed, then the app actually does send a response that the client doesn't expect. Is that the same scenario or the opposite of what you're proposing?