[ZeroBrane Studio] Re: debug lua on an embedded micro

  • From: Paul K <paul@xxxxxxxxxxxxx>
  • To: "zerobrane@xxxxxxxxxxxxx" <zerobrane@xxxxxxxxxxxxx>
  • Date: Tue, 16 Sep 2014 14:18:50 -0700

Hi Jim,

> I found that when my script hits the breakpoint, execution stops with a
call to is_pending()

That's normal; is_pending will try to read one character, but in a
non-blocking way (it does settimeout(0)). Check if your receive(1)
implementation takes timeout into account.

It's possible to rewrite it using select, but receive(1) has some
advantages, so this is what mobdebug is using.

Paul.

Other related posts: