Windows下lua+redis调试环境搭建
来源:互联网 发布:美工修图多少钱一张 编辑:程序博客网 时间:2024/06/01 10:55
Lua+Redis 断点调试环境搭建
windows环境,使用Redis,写lua脚本头疼的问题之一不能对脚本断点调试,google加上自己的摸索,终于搞定。
1、下载ZeroBraneStudio,我下载的是破解版(我自己为自己感到可耻,其实并不贵,百十来块钱的样子)
解压后在bin下有lua解释器的路径,把该路径添加到环境变量中:假设解释器路径是:D:/ZeroBraneStudio/bin/lua.exe,那么就把D:/ZeroBraneStudio/bin添加到Path环境变量下。
2、下载luaRocks,它是一个lua相关类型的维护工具包,下载地址:https://github.com/keplerproject/luarocks/wiki/Installation-instructions-for-Windows。
下载后从cmd命令行中运行Install.bat安装。
3、安装redis及调试相关类库:
打开cmd依次运行三个命令进行安装:
luarocks install remdebug
luarocks install prtr-dump
luarocks install redis-lua
4、打开ZeroBraneStudio,建lua脚本,名字随意,比如my.lua,添加如下内容:
local redis = require 'redis'local host = "127.0.0.1"local port = 6379client = redis.connect(host, port)redis.call = function(cmd, ...) return assert(loadstring('return client:'.. string.lower(cmd) ..'(...)'))(...)end
阅读全文
0 0
- Windows下lua+redis调试环境搭建
- windows下搭建Lua环境
- Windows下搭建Redis环境
- Windows平台下LUA环境的搭建
- lua windows环境搭建
- redis windows下的环境搭建
- redis windows下的环境搭建
- (转)redis windows下的环境搭建
- redis windows下的环境搭建
- windows下的环境搭建配置redis
- windows下的环境搭建配置redis
- windows下的环境搭建配置redis
- redis windows下的环境搭建
- redis windows下的环境搭建
- redis windows下的环境搭建
- redis windows下的环境搭建
- redis windows下的环境搭建
- redis windows下的环境搭建
- XYNUOJ 图像有用区域
- Jzoj5429 排列
- matplotlib的图片文字乱码
- 19.笔记JAVA Spring框架学习————Spring整合Hibernate
- java:文件的复制
- Windows下lua+redis调试环境搭建
- 如何简单设计接口测试用例
- 上升动画,缩小动画
- python打包
- java之Static关键字解析
- 20.笔记JAVA Spring框架学习————Spring整合Hibernate
- es6转es5在线工具
- mysql导入数据(load data local infile)
- spring中scope作用域(转)