Skip to content

IntelliJ IDEA + EmmyLua + mobdebug = very unstable handshake #74

Description

@neopaf

Version: 0.8
When initiating debug most of times (but not 100%, maybe in 1% it works fine), it looks like this:

Start mobdebug server at port:8172
Waiting for process connection...
Connected.

And then nothing happens. Execution point is not showed in source code. As if handshake is not passed.

Investigated, discovered with Wireshark that "DELB * 0\n" command is sent by server-side into the app.
But call to server:receive() in debugger_loop never returns.
netstat showed that app read everything from network.

lldb to lua client process shows that somebody calls receive(1) before debugger_loop does that and steals bytes from incoming request.

Search in source code shows that :receive(1) only here:
https://github.com/pkulchenko/MobDebug/blob/0.80/src/mobdebug.lua#L489

If I comment that line out, handshake always passes OK.

I assume that is_pending mechanism

  • should not be invoked at the very beginning, when handshake is not passed;
  • or it is broken completely? I don't get it what good would stealing 1 character from server->client stream could do. But then I could be stupid ;)

Пользуясь случаем, огромное спасибо за замечательную работу, пользуемся каждый день много лет!

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions