pkulchenko / ZeroBranePackage

Packages for ZeroBrane Studio (https://studio.zerobrane.com)
MIT License
245 stars 149 forks source link

Redis: Enhancement request: Implement workaround for 'Step Over (Shift+F10)' #64

Closed tw-bert closed 6 years ago

tw-bert commented 6 years ago

redis.lua: 0.36 redis 4.0.6

Redis itself currently does not support 'Step Over'. In ZBS, 'Step Over'/'Step Into'/.'Step Out' all perform the same function: 'Step Into'.

Would it be easy to implement the following workaround?

This would enhance the flow tremendously.

pkulchenko commented 6 years ago

Redis itself currently does not support 'Step Over'. In ZBS, 'Step Over'/'Step Into'/.'Step Out' all perform the same function: 'Step Into'.

Right; this is the current limitation of the Redis debugger.

Let ZBS set a (possibly hidden) temporary breakpoint at the next executable source code line (this might be the tricky part)

I don't think it's possible without some combination of static and run-time analysis, as you'd need to know things like whether the last loop statement is really the last one or not (depending on the current value) or where the control will jump after break and many other similar things.

The IDE already provides Run To Cursor (currently linked to Ctrl+Shift+F10), so you can either use that, or remap it to Shift+F10, but you'll need to move the cursor to the target position before invoking it.

I don't think there is much else that I can offer, unless you can come up with some simple logic to detect the "next" executable line.

tw-bert commented 6 years ago

Makes sense, thanks for your insights.

itamarhaber commented 6 years ago

I don't think there is much else that I can offer, unless you can come up with some simple logic to detect the "next" executable line.

I think Intel has this wonderful tech ;)

pkulchenko commented 6 years ago

I think Intel has this wonderful tech ;)

Indeed ;).

@itamarhaber, since you are stopping by, any insight into 1024 limit and '<eof>' expected error in #62?

itamarhaber commented 6 years ago

@pkulchenko certainly - seems like my notifications are broken though :(