[ZeroBrane Studio] Re: print to debug console

  • From: Thijs Schreijer <thijs@xxxxxxxxxxxxxxxxx>
  • To: "zerobrane@xxxxxxxxxxxxx" <zerobrane@xxxxxxxxxxxxx>
  • Date: Sat, 5 Dec 2015 00:11:46 +0000



-----Original Message-----
From: zerobrane-bounce@xxxxxxxxxxxxx [mailto:zerobrane-bounce@xxxxxxxxxxxxx]
On Behalf Of Paul K
Sent: vrijdag 4 december 2015 23:53
To: zerobrane@xxxxxxxxxxxxx
Subject: [ZeroBrane Studio] Re: print to debug console

Yes, you can use "debugger.runonstart = true" to run after connecting
without stopping.

Here as well; this is server side only. Allowing to connect without
breaking from the code itself would be useful.
(I looked at the code to see whether I could come up with a PR, but I
don't dare tough that code as I know too little about the Lua debugger
capabilities)

Thijs, I see your point, but it's problematic to do in the application
for several reasons. At the point of connecting the debugging is not
fully setup yet as the controller (in the IDE) still needs to set
basedir and (optionally) configure "print" redirect and debugger
initialization. Since the application continues, it doesn't get the
chance to set the basedir, which breaks the interaction with the IDE.
It may still be fixed to allow basedir to become optional, but this
would (1) prevent breakpoints from working and (2) still require some
configuration server-side (to indicate that basedir doesn't need to be
sent).

Why would you not want to control this in the IDE? After all, this is
what the debugger controller is for...

OpenResty is basically a deamon, and for individual requests you're right. But
in my case I want to just sit back and watch debug data scroll by to see what
is happening. 2 out of a 100 requests I want to see, without having to push
'continue' 100 times.

Thijs


Paul.

Other related posts: