Git Product home page Git Product logo

zerobranepackage's Introduction

Project Description

ZeroBrane Package is a collection of packages for ZeroBrane Studio.

You can find more information about ZeroBrane Studio packages and plugins in the documentation.

Installation

To install a plugin, copy its .lua file to ZBS/packages/ or HOME/.zbstudio/packages/ folder (where ZBS is the path to ZeroBrane Studio location and HOME is the path specified by the HOME environment variable). The first location allows you to have per-instance plugins, while the second allows to have per-user plugins. The second option may also be preferrable for Mac OSX users as the ZBS/packages/ folder may be overwritten during an application upgrade.

Dependencies

The plugins may depend on a particular version of ZeroBrane Studio. One of the fields in the plugin description is dependencies that may have as its value (1) a table with various dependencies or (2) a minumum version number of ZeroBrane Studio required to run the plugin.

If the version number for ZeroBrane Studio is larger than the most recent released version (for example, the current release version is 0.50, but the plugin has a dependency on 0.51), this means that it requires a development version currently being worked on (which will become the next release version).

Package List

Author

Paul Kulchenko ([email protected])

License

See LICENSE.

zerobranepackage's People

Contributors

cpeosphoros avatar crumblingstatue avatar daviel avatar itamarhaber avatar madmaxoft avatar mailaender avatar markfainstein avatar pkulchenko avatar rami-sabbagh avatar robertlzj avatar sclark39 avatar silverkorn avatar solvaring avatar tieske avatar tw-bert avatar zatherz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zerobranepackage's Issues

Compare Plugin

Dear @pkulchenko
by our own demand we created a small compare plugin, which I'd like to share with you.
It add's a Compare to the context menu in the filetree, if TWO items are selected, and on activation it calls the configured diff tool. See the comment in the script, how to configure.

Please make a review. If you like it, please feel free to share it at https://github.com/pkulchenko/ZeroBranePackage

------------------------------------------------------------
-- To be configured in user.lua:
------------------------------------------------------------
-- for linux use
-- ide.config.diff_cmd="meld"
-- or for windows use (due difficulties in windows with quotes in os.execute)
-- ide.config.diff_cmd=[[start "DIFF" "C:\Program Files\ExamDiff Pro\ExamDiff.exe"]]
------------------------------------------------------------

local COMPARE_PLUGIN =
{
	name = "Compare plugin",
	description = "Plugin to compare two files",
	author = "J.Jørgen von Bargen",
}


local ID_COMPARE = ID("COMPARE_PLUGIN.compare")

local DIRSEP=package.config:match("^(%S+)%s") or "/"

------------------------------------------------------------
-- get items from the tree
-- return {list-of-selected}
------------------------------------------------------------
local function GetSelectedTreeItems()
	local tree=ide:GetProjectTree()
	local function GetText(itemId)
		if itemId:IsOk() then
			local parentItemId=tree:GetItemParent(itemId)
			if parentItemId:IsOk() then
				local parentText=GetText(parentItemId)
				return parentText..DIRSEP..tree:GetItemText(itemId)
			end
			return tree:GetItemText(itemId)
		end
	end
	local selected={}
	if tree:HasFlag(wx.wxTR_MULTIPLE) then
		for i,treeItemId in ipairs(tree:GetSelections()) do
			selected[#selected+1]=GetText(treeItemId)
		end
	else
		selected[#selected+1]=GetText(tree:GetSelection())
	end
	return selected
end


local function onCompare(event)
	local diff_cmd = ide.config.diff_cmd or "meld"
	local selected=GetSelectedTreeItems()
	if #selected==2 then
		local cmd=('%s "%s" "%s"'):format(diff_cmd,unpack(selected))
		DisplayOutputLn(cmd)
		os.execute(cmd.." &")
	end
end

function COMPARE_PLUGIN:onRegister()
	local tree=ide:GetProjectTree()
	tree:Connect(ID_COMPARE,wx.wxEVT_COMMAND_MENU_SELECTED,onCompare)
end

function COMPARE_PLUGIN:onUnRegister()
	local tree=ide:GetProjectTree()
	tree:Disconnect(ID_COMPARE)
end

function COMPARE_PLUGIN:onMenuFiletree(menu,tree,event)
	local selected=GetSelectedTreeItems()
	if #selected==2 then
		menu:Append(ID_COMPARE,TR("Compare"))
	end
end

return COMPARE_PLUGIN

There is no descriptions for plugins

This is a very nice project but where are the descriptions for each plugin?
I have to manually open a file and search for comments in order to understand what a plugin does.

LuaRocks package

Hello @pkulchenko,

I've developed a package for ZeroBrane Studio to search, install, and manage LuaRocks.org modules directly within the IDE. Additionally, the plugin can manage packages directly within the IDE. Users will be able to submit packages directly to LuaRocks.org for display/installation via the plugin.

The plugin can self-update.

zbstudio

I've tested it on both Windows and Ubuntu. Unfortunately, I don't have access to other operating systems for testing.

Project link: https://github.com/Propagram/ZeroBranePackage-LuaRocks

I still need to conduct further tests and improvements. My plan is to maintain the plugin, fixing bugs, and possibly adding more features (pull requests welcome).

Question: Is there a possibility to bundle this package with the installer if it's genuinely useful for the community?

Package for Remote-Debugging via SSH

Dear @pkulchenko

It started as an attempt to use ZBS as remote IDE for Raspi, but it turned out to provide a generic package for remote debugging via SSH. Please kindly review the package and if you like it, add it to https://github.com/pkulchenko/ZeroBranePackage

But I also have some issues with this. During remote debug every output line is displayed twice in ZBS.

Twiddling with

debugger.port =9876
debugger.redirect = 'r'
debugger.hostname="192.168.1.27"

in project settings seems to have no effect on the rundebug argument passed to sshlua:frun(). Maybe you can give me advice.

So here it is sshlua.lua :

--[[
Remote debugging for ZeroBrane via ssh. Initial create to be used with Raspi,
but then shows up to be of general use.

#1. Setting up the remote system

How to read:
_#_         comment lines not to be entered
_remote>_   command to be entered in the remote system
_local>_    command to be entered on the local host
_ipaddr_    address of the remote system
_username_  username on the remote system

#1.1 Make ssh functional

 # install SSH server
 _remote>_ sudo apt install openssh-server
 # install SSH client
 _local>_ sudo apt install openssh-client
 # create as public/private rsa key pair
 _local>_ ssh-keygen -t rsa -b 4096 -N "" -f ~/.ssh/luassh
 # authenticate by key file
 _local>_ ssh-copy-id -i .ssh/luassh.pub username@ipaddr
 # test connection
 _local>_ ssh username@ipaddr

#1.2 Install required lua packages

 # install lua packages
 _remote>_ sudo apt install lua5.1 lua-socket
 # copy mobdebug to right place on remote system
 _local>_ scp /opt/zbstudio/lualibs/mobdebug/mobdebug.lua username@ipaddr:.
 _remote>_ sudo mkdir -p /usr/local/share/lua/5.1/
 _remote>_ sudo mv ~/mobdebug.lua /usr/local/share/lua/5.1/

#1.3 (Optional) packages I recommend (but this depends on your needs)

 _remote>_ sudo apt install lua-filesystem lua-bitop lua5.1-doc
 _remote>_ sudo cp /usr/share/doc/lua5.1-doc/etc/strict.lua /usr/local/share/lua/5.1/

#2. Setting up your project

* Install https://github.com/pkulchenko/ZeroBranePackage/blob/master/projectsettings.lua to Zerobrane
* Restart ZBS and open your project
* Invoke menu "Edit" / "Preferences" / "Settings: Project"
* Enter the following lines
---------------------
package "sshlua.lua"
ide.packages.sshlua.sshlogin="username@ipaddr"
ide.packages.sshlua.subdir="mytest"
---------------------
and save
* Rightclick on the "user.lua" tab and select "Open containing folder"
* Copy sshlua.lua into this folder
* Restart ZBS and open your project

#3. How to use

Just edit, run or debug files in your project, as normal. 
On Save files will be copied to subdir on remote system. 
Run and Debug will execute the script on remote system.
--]]

------------------------------------------------------------
--PACKAGE
------------------------------------------------------------
local sshlua=
{
	name = "sshlua",
	description = "ssh remote lua",
	author = "J.Jørgen von Bargen",
	version = 0.1,
	hasdebugger = true,
}

--
-- common utilities functions
--
local function quoteshell(path)
	return "'"..path:gsub("'","'\\''").."'"
end

local sprintf=string.format
local function printf(...)
	ide:Print((sprintf(...):gsub("%s+$","")))
end

local function vis(val)
	if type(val)~="string" then return tostring(val) end
	return '"'..val..'"'
end



function sshlua:get_remote_path(doc_path)
	--
	-- ignore files outside project
	--
	local proj_dir=ide:GetProject()
	if doc_path:sub(1,#proj_dir)~=proj_dir then return nil end
	local remote_path=doc_path:sub(#proj_dir+1)
	--
	-- ignore files in .zbstudio folder
	--
	if remote_path:match("^%.zbstudio") then return nil end
	--
	-- create relative to subdir
	--
	if self.subdir then remote_path=self.subdir.."/"..remote_path end
	return remote_path
end

function sshlua:frun(wfilename,rundebug)
	printf("interpreter:frun(%s,%s)\n",vis(wfilename:GetFullPath()),vis(rundebug))
 	--
	-- verify the path belongs to the project and get remothe path
	--
	local local_path=wfilename:GetFullPath()
	local remote_path=self:get_remote_path(local_path)
	if not remote_path then return end
	--
	-- build command to be executed remotely
	--
	local luacmd=rundebug and sprintf("lua -e %q %q",rundebug,remote_path)
	or sprintf("lua %q",remote_path)
	printf("luacmd=[[%s]]\n",luacmd)
	local sshcmd="ssh -4 "..self.sshlogin.." "..quoteshell(luacmd).." 2>&1"
	printf("sshcmd=[[%s]]\n",sshcmd)
	local pid=CommandLineRun(sshcmd,ide:GetProject(),true,false)
	return pid
end

function sshlua:onRegister()
	ide:AddInterpreter(self.name, self)
	ProjectSetInterpreter(self.name)
end

function sshlua:onEditorSave(ed)
	--
	-- get document
	--
	local doc = ide:GetDocument(ed)
	if not doc then return end
	--
	-- verify the path belongs to the project and get remothe path
	--
	local local_path=doc:GetFilePath()
	local remote_path=self:get_remote_path(local_path)
	if not remote_path then return end

	--
	-- copy file to remote system via scp
	--
	local scpcmd=sprintf("scp -4 %s "..self.sshlogin..":%s",quoteshell(local_path),quoteshell(remote_path))
	local sts=os.execute(scpcmd.." 2>&1")
	printf("[[%s]] sts %s\n",scpcmd,vis(sts))

	if sts~=true then
		--
		-- maybe dir is missing ??? try to create
		--
		local remote_dir=remote_path:match("(.*)/") or "."
		local mkdircmd="ssh -4 "..self.sshlogin.." "..quoteshell("mkdir -vp \""..remote_dir.."\"")
		sts=os.execute(mkdircmd.." 2>&1")
		printf("[[%s]] sts %s\n",mkdircmd,vis(sts))
		if sts~=true then
			printf("cmd=[[%s]] failed\n",mkdircmd)
			return
		end
		--
		-- retry copy
		--
		sts=os.execute(scpcmd.." 2>&1")
		printf("[[%s]] sts %s\n",scpcmd,vis(sts))
	end
	if sts~=true then
		printf("cmd=[[%s]] failed\n",scpcmd)
		return
	end
end

return sshlua

Sample api plugin?

I can't get the sample api plugin to work. I copied and pasted the sample under 'Registering an API' which I assume means I should get autocompletion when I type sample. I should see val1 and val2 come up, but I'm not seeing anything.

I know the plugin is running because I added some ide:print statments:

Sample plugin creating 'api' table
Sample plugin returning result
Sample plugin onRegister - adding lua/sample api

replace in files

I believe I am on the lastest version. W10 updates up to date.

I search for _cfn replace _CFN Aa button active. activate replace all button. finds 38 in 4 files. put my cursor in the results box and save. save all is greyed out. it saves 0. what are the actual steps and order to save these changes? It always comes as a surprise to me when it work, which it does sometimes. I must not understand the steps.

Setting a different display format for tables in the console for the torch7 plugin

Displaying table's values in the console when using the torch7 interpreter gets a little annoying. The output of a table is displayed only by an hexa number:

>>>a = {1,2,3}
>>>a
table: 0x41eb62b0

while in other Lua interpreters the table outputs in the following format

>>>a = {1,2,3}
>>>a
{1, 2, 3} --[[table: 0x41eb62b0]]

My question is how to setup the torch7 interpreter to output tables like in the previous form so its easier to visualize its con

Feature Request - Clippy - Type index to select and paste from 'AutoCompSelect' list

Currently, type number of index without select anything in editor, will actually write the number into editor and select (but not paste) corresponding item in the 'AutoCompSelect' list.
And, type number of index with something selected in editor, will replace the the selection with the number and close the 'AutoCompSelect' list.

Maybe, type number of index will paste corresponding item in the 'AutoCompSelect' list, is nice.

highlightselected plugin deselects integers

Tested on mac only, if you hold down left click on the right side of an integer number, while dragging left across the number, the selection bugs out and deselects the number.

sample code:
local num = 1

This only happens for integers, not decimal numbers. It also only happens when you select the entire number, for example, with integer 100, the bug only happens once all 3 integers places are selected from left to right

run button is not enabled

i installed and kept that redis.lua file in the required location after that i selected redis interperter but that run button is not enabled is there any specific reason for this

analyzeall: Add ability to ignore specific paths

There might be files that the user does not want to analyze, e.g. external libraries.
There should be a configuration option or something similar to let the user give analyzeall a list of paths to ignore. It could be a simple configuration option like

analyzeall.ignore = {'ignore_me.lua', 'extlibs/'}

realtimewatch console colors

Plugin realtimewatch.lua causes console colors to fail, it does not sho colors but their codes like "\27[1;34m[----------]\27[0m".

[torch] IDE is unable to find th in the correct location

I've added the torch7.lua plugin to ZBS v 1.30.
When I try running any script with Torch7 or QLua interpreter selected, I get the following error:

Can't find qlua in any of the folders in PATH or TORCH_BIN: /home/alevol/nn/torch/install/bin, /home/alevol/nn/torch/install/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /home/alevol/bin
It's unable to find /home/alevol/nn/torch/install/bin/th in those dirs.

I've tried to paste parts of the script to ZBS's Local console and it worked as intended:

function findCmd(cmd, env)
  local path = (os.getenv('PATH') or '')..sep
             ..(env or '')..sep
             ..(os.getenv('HOME') and os.getenv('HOME') .. '/bin' or '')
  local paths = {}
  local res
  for p in path:gmatch("[^"..sep.."]+") do
    res = res or GetFullPathIfExists(p, cmd)
    table.insert(paths, p)
  end

  if not torch then
    DisplayOutputLn(("Can't find %s in any of the folders in PATH or TORCH_BIN: "):format(cmd)
      ..table.concat(paths, ", "))
    return
  end
  return res
end
findCmd('th')
"/home/alevol/nn/torch/install/bin/th"
findCmd(win and 'th.bat ' or 'th', os.getenv('TORCH_BIN'))
"/home/alevol/nn/torch/install/bin/th"

How can I fix this?

Torch7 problem - continued

Torch7 does not work ...

I did as suggested in posting March 29, 2016:


@orange15, I figured out what's happening. You have several options:

  1. Point path.torch to th file: path.torch = [[/Users/mac/torch/install/bin/th]]. This will launch th instead of lua executable and it should be able to find its own libraries.

  2. Point path.torch to install folder (not bin): path.torch = [[/Users/mac/torch/install/]]. You may get an error about libpaths having the wrong architecture, which is caused by the fact that lua executable that is included with the IDE is 32bit, but libraries and executables included with torch are 64bit. To fix that you may need to add path.lua = [[/Users/mac/torch/install/bin/luajit]], which will configure the IDE to use luajit from the torch install.


Option 1) results in:

require 'nn'
error loading module 'libpaths' from file '/Users/Mac/torch/install/lib/lua/5.1/libpaths.so':
dlopen(/Users/lMac/torch/install/lib/lua/5.1/libpaths.so, 6): no suitable image found. Did find:
/Users/Mac/torch/install/lib/lua/5.1/libpaths.so: mach-o, but wrong architecture
[C]: at 0x00091340
[C]: in function 'require'
...Mac/torch/install/share/lua/5.1/paths/init.lua:1: in main chunk
[C]: in function 'require'
...Mac/torch/install/share/lua/5.1/torch/init.lua:12: in main chunk
[C]: in function 'require'
.../Mac/torch/install/share/lua/5.1/nn/init.lua:1: in main chunk

Option 2) results in:

require 'nn'
module 'nn' not found:
no field package.preload['nn']
no file '/Users/Mac/install/share/lua/5.1/nn.lua'
no file '/Users/lMac/install/share/lua/5.1/nn/init.lua'
no file '/Users/Mac/share/lua/5.1/nn.lua'
etc. etc.

Any idea what to do?

Ludwig

wxLua Runtime Error when clicking on the interpreter in the status bar

Lua: Error while running chunk
src/editor/package.lua:149: wxLua: Unable to call an unknown method 'GetFirst' on a 'wxMenuItemList' type.
stack traceback:
    [C]: ?
    src/editor/package.lua:149: in function 'CloneMenu'
    src/editor/gui.lua:69: in function <src/editor/gui.lua:63>
    [C]: in function '?'
    src/main.lua:767: in main chunk
    [C]: ?

Crashes the application (version 1.30) when hitting either Cancel. Does nothing when clicking OK

Torch7 plugin command line argument support

The menu entry for command line options is greyed out when using the torch 7 interpreter. I can still get command line options by going into another interpreter, changing the options, and then switching back to the torch interpreter, however.

OpenRA Update incoming

There's a new playtest out on their end so the openra.lua file will need updating soon.

Redis: Float precision is lost in Stack and Remote Console

Redis 4.0.8, redis.lua 0.36

High precision floats/doubles (numbers) have precision loss, while viewing for debugging only.
The actual value is fine, but can't be shown in ZeroBrane.
I have no idea if this is a Redis limitation or a ZeroBrane limitation.

See the following code:

    request_curr.now = request_argv.now 
    request_curr.now_debug_str = string.format("%015.6f",request_argv.now) -- Just for debugging, to show no precision has been lost. This is near impossible to see from ZeroBrane and/or Redis stack directly.

And the Stack:
image
(obviously, 'now' has lost precision)
Remote Console gives similar issues.

I tried (user.lua):

debugger.numformat = "%015.15f"

But that gives:
image

Redis: Minor issues Remote Console

redis.lua: version 0.33

  • Using caps for redis commands seems not working if no parameters are used. Workaround: use @ .
  • Using hgetall gives a parse error. Workaround: use redis.call()

Gist that replicates both small issues:

INFO
"ldb_eval:1: Script attempted to access nonexistent global variable 'INFO'"

@hset hello world 1
1
@hset hello universe 2
1

@hgetall hello
Error in processing results: [string "return {["world","1","universe","2"]}"]:1: ']' expected near ','

redis.call('hgetall','hello')
{"world"; "1"; "universe"; "2"}

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

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?

  • If 'Step Over' is requested (Shift+F10):
  • Let ZBS set a (possibly hidden) temporary breakpoint at the next executable source code line (this might be the tricky part)
  • Let ZBS do a 'Continue'
  • Let ZBS remove the temporary breakpoint

This would enhance the flow tremendously.

Redis: Disable tooltip debug variable watch evaluation

ZeroBrane Studio (1.70; MobDebug 0.702) , Win7 x64, ZeroBraneStudioEduPack-1.70-win32.exe, redis.lua (0.33)

I just started trying out ZBS.

When debugging a complex Lua script, evaluated in Redis (4.0.6), all seems fine at first.
Debugger is connected, and ZBS halts at the first executable line.
I can step through, stack is shown, beautiful stuff.

However, after debugging deeper inside the script, when I hover over some random keywords, the buttons:
1
become grey:
1

and the whole debug session, even though still running (shown in the console), has become useless (and I have to start over again).

The issue seems to occur when hovering with the mouse over a 'redis' global, but happened at a few other hovers as well (like hovering over an OO function's parameter). Since I can't always control where my mouse is (who can), ZBS is not workable for me at the moment (and that would be a shame, it seems great otherwise).

I tried to reproduce the issue in a simpler script, but no luck so far.
I can't copy/paste the script due to NDA (and anonymizing is not feasable, too big).

So for now:
Can I disable the "tooltip debug variable watch evaluation" in some way? I tried autocomplete = false in user.lua, but that didn't do the trick.

I hope I can provide you a bug reproducable script in the future. Maybe you can provide me with some tips on how to zoom in (like: can I turn on a system debug log, or can I capture tracing of redis.lua, or insert some debug code in redis.lua?)

endofline plugin

@pkulchenko Another plugin from me, please review and add to ZeroBranePackage if you like it. 🍺

It takes care about actions mentioned in the
Use 'ide:GetEditor():SetViewEOL(1)' to show line endings and ide:GetEditor():ConvertEOLs(ide:GetEditor():GetEOLMode())' to convert them. message

🆘 Help is needed 🆘 The onUpdateUi is not functional (does not set checkmark) Do you have a suggestion?

endofline.lua :

local idShowLineEndings = ID("endofline.show")
local idConvertCrLf = ID("endofline.crlf")
local idConvertLf = ID("endofline.lf")
local idConvertCr = ID("endofline.cr")

return 
{
	name = "endofline",
	description = "Adds Menus do show and convert end of lines",
	author = "J.Jørgen von Bargen",
	version = 0.01,
	onRegister = function(self)
		local viewMenu = ide:FindTopMenu("&View")
		local editMenu = ide:FindTopMenu("&Edit")
		local sourceId = editMenu:FindItem("Source")
		local sourceMenu = editMenu:FindItem(sourceId)
		local sourceSubMenu=sourceMenu:GetSubMenu()

		viewMenu:Append(idShowLineEndings,"End of line")
		sourceSubMenu:Append(idConvertCrLf,"Convert to CrLf")
		sourceSubMenu:Append(idConvertLf,"Convert to Lf")
		sourceSubMenu:Append(idConvertCr,"Convert to Cr")

		local function onShowLineEndings(event)
			ide:GetEditor():SetViewEOL(not ide:GetEditor():GetViewEOL())
			ide:GetUIManager():Update()
		end
		local function onConvertCrLf()
			ide:GetEditor():ConvertEOLs(wxstc.wxSTC_EOL_CRLF)
		end
		local function onConvertLf()
			ide:GetEditor():ConvertEOLs(wxstc.wxSTC_EOL_LF)
		end
		local function onConvertCr()
			ide:GetEditor():ConvertEOLs(wxstc.wxSTC_EOL_CR)
		end
		local function onUpdateUi(event)
			ide:GetMenuBar():Check(idShowLineEndings,ide:GetEditor():GetViewEOL())
		end

		ide:GetMainFrame():Connect(idShowLineEndings,wx.wxEVT_COMMAND_MENU_SELECTED,onShowLineEndings)
		ide:GetMainFrame():Connect(idShowLineEndings,wx.wxEVT_UPDATE_UI,onUpdateUi) 
		ide:GetMainFrame():Connect(idConvertCrLf,wx.wxEVT_COMMAND_MENU_SELECTED,onConvertCrLf)
		ide:GetMainFrame():Connect(idConvertLf,wx.wxEVT_COMMAND_MENU_SELECTED,onConvertLf)
		ide:GetMainFrame():Connect(idConvertCr,wx.wxEVT_COMMAND_MENU_SELECTED,onConvertCr)
	end,
	onUnRegister = function(self)
		ide:RemoveMenuItem(idShowLineEndings)
		ide:RemoveMenuItem(idConvertCrLf)
		ide:RemoveMenuItem(idConvertLf)
		ide:RemoveMenuItem(idConvertCr)
	end,
}

Redbean debugging

Hi, I've followed the Redbean debugging guide (https://notebook.kulchenko.com/redbean/redbean-debugging-with-zerobrane-studio).
The "execute current project works", but the "start or continue debugging" button does not when there is any code after if MDB then MDB.on() end.
I have tried Redbean 2.2 and 2.0.19 both with and without assimilating the binary (with the newest version of Zerobrane on Debian host machine).
I've also tried debugging a Lua page file, which didn't crash but it did not apply the breakpoint.
As a check I debugged the project with the Lua 5.3 interpreter and that did work.
Screenshot_2023-06-18_09-29-41

Fork() failed: can't run EVAL in debugging mode.

Following https://redislabs.com/blog/zerobrane-studio-plugin-for-redis-lua-scripts#.WG0vZ_krIUE:

My program:

return redis.call('ping')

Redis version:

3.2.3 (Azure Redis Cache)

When executing:

Program starting as '"C:\Data\Packages\ZeroBraneStudioEdu-1.5.0\bin\lua.exe" "C:\Data\Packages\ZeroBraneStudioEdu-1.5.0\packages\redis.lua" --instance redis://localhost:6380 --controller PcName:8172 --debug no --password "***" "C:\Data\Packages\ZeroBraneStudioEdu-1.5.0\myprograms\untitled.lua"'.
Program 'lua.exe' started in 'C:\Data\Packages\ZeroBraneStudioEdu-1.5.0\myprograms' (pid: 10512).
PONG
Program completed in 0.23 seconds (pid: 10512).

When debugging:

Program starting as '"C:\Data\Packages\ZeroBraneStudioEdu-1.5.0\bin\lua.exe" "C:\Data\Packages\ZeroBraneStudioEdu-1.5.0\packages\redis.lua" --instance redis://localhost:6380 --controller PcName:8172 --debug yes --password "***" "C:\Data\Packages\ZeroBraneStudioEdu-1.5.0\myprograms\untitled.lua"'.
Program 'lua.exe' started in 'C:\Data\Packages\ZeroBraneStudioEdu-1.5.0\myprograms' (pid: 14512).
Fork() failed: can't run EVAL in debugging mode.
Program completed in 0.23 seconds (pid: 14512).

Is it because of my Redis version?

Error at packages\livecodingtoolbar.lua:11

When loading, this shows up:
onRegister event failed: packages\livecodingtoolbar.lua:11: wxLua: Unable to call an unknown method 'InsertTool' on a 'wxAuiToolBar' type.

Outputclone - remember last position

Is there any way to set a position or have it default to last position? Using multi monitors and it resets every time I load ZeroBraneStudio...

[Debug Redis] redis.lua:1831: attempt to index global 'socket' (a nil value)

Hello, I use this useful lua ide to debug redis lua.
I meet this error in debug mode.

Program starting as '"/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/lua.app/Contents/MacOS/lua" "/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/packages/redis.lua" --instance redis://localhost:6379 --controller localhost:8172 --debug yes "/Users/user/Desktop/2.lua" txt , 1 2'.
Program 'lua' started in '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms' (pid: 13869).
/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/lua.app/Contents/MacOS/lua: ...neStudio.app/Contents/ZeroBraneStudio/packages/redis.lua:1831: attempt to index global 'socket' (a nil value)
stack traceback:
	...neStudio.app/Contents/ZeroBraneStudio/packages/redis.lua:1831: in main chunk
	[C]: at 0x010091edc0
Program completed in 0.13 seconds (pid: 13869).

but if i execute it directly(not in debug mode), no error report

lua version: 5.4
redis-lua: 2.0.4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.