k0204 / luaide Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
使用后一直提示 扩展主机意外中止,请重新加载窗口以恢复。
因为不同平台的需求,我们项目是unity的,有一些代码api都是由C# 提供的,原生api是由unity提供的库提供的,还有一些第三方dll库。如果可以自定义api提示,我们就可以直接自己生成这些api出来,在写代码提示的不会那么累 而且还可以做代码检查 是否使用规范 。
我们项目没有使用luasocket,接受网络数据在lua中是回调的方式。
我尝试用一个messageQueue缓存接受的消息,然后在debugger_loop中处理逻辑,但是没有成功。
local a,b;
提示 没有赋值。。
local test1 = 0.2
if 0.1>test1 then
end
if test>0.2 and 0.1>test1 then
end
0.1会报红
local test1 = 10010010
local test2 = test1/100%10
100会报红
在mac下面c++的log没法输出,在cocos中表现为CCLog的输出没有在vscode的调试控制台输出。但是oc的log也就是NSLog倒是可以输出。我尝试了用下面代码,是可以输出log的
var callfile = require('child_process');
var h = callfile.spawn("/Users/nervecell/workspaces/game.app/Contents/MacOS/game");
h.stdout.on('data', function (s) {
console.log(s.toString());
});
h.stdout.on('end', function () {
console.log('ls done');
});
0.1.8 版本没有代码提示了
1:采用[[ string ]]定义字符串时,
2:‘“’。 和”‘“ 会有问题:
3:” \a \x \b“ 之类的一些字符
以上情况格式化时都会出现‘\’数量变化的情况,
在我4月9号提交的pull request中针对解决了上述问题
RT
当前自动补全只能提示本文件,而VSCODE自带的自动补全提示是整个项目,期待更新。
具体情况差不多和标题一样:在调试过程中,如果lua执行出错,有机会出现错误信息不打印的情况。这边没法截图,我在群里是东郭哈,需要详细情况可以问我。
如题 重现不了可联系我。。qq943100400
触发断点后,点击F5继续执行,此后的print都不会再有输出,如果按的是f10,则会有继续的输出.
建议用特殊的颜色标明全局变量
, 因为有时候会漏写 local 限定并且难以被发现
一般我都用两个空格作为缩进对齐,但是一使用插件自动对齐后全部空格都被替换成tab,下次打开自动检测tab size又有可能变成4个空格。希望能增加自动对齐的缩进配置谢谢。
提示找不到资源,双击EXE运行是OK的,但是如果用debugLua运行,就报错,找不到资源
右键点击格式化代码时会将转义字符的反斜杠 \ 删掉
格式化之代码前字符串 : local str = ""%s""
格式化代码之后变成 : local str = ""%s""
建议格式化的时候 不要把空行直接格式化掉
程序员都是强迫症患者 可以把多余的空行格式化成一行
再次感谢luaide
BUG1:
for i,v in pairs(self.tempTeam) do
g_DataPool:GetArenaData().defLayout[i] = v
end
这样v有红线
for i,v in pairs(self.tempTeam) do
g_DataPool:GetArenaData().defLayout = v
end
这样就没有
BUG2
math.floor(x/60%z)
这样会有错误提示
math.floor(x/60 %z)
多个空格, 这样就不会有
windows cocos2dx 3.x + lua 工程
luadebug文件: luadebugJit.lua
获取断点信息时, 盘符大小写不匹配导致不能正确删除断点.
输出信息:
**第一次添加断点**
dump from: [string ".\luadebugJit.lua"]:841: in function 'debugger_setBreak'
断点信息
- "datas" = {
- 1 = {
- "fileName" = "LogonScene.lua"
- "lines" = {
- 1 = 261
- }
- "serverPath" = "d:/RYclient/client/client/src/plaza/views/LogonScene.lua"<===小写盘符
- }
- }
添加断点结果
dump from: [string ".\luadebugJit.lua"]:869: in function 'debugger_setBreak'
- "breakInfos" = {
- "LogonScene.lua" = {
- "d:/RYclient/client/client/src/plaza/views/LogonScene.lua" = { <===小写盘符
- "lines" = {
- 261 = true
- }
- "pathNames" = {
- 1 = "d:"
- 2 = "RYclient"
- 3 = "client"
- 4 = "client"
- 5 = "src"
- 6 = "plaza"
- 7 = "views"
- 8 = "LogonScene.lua"
- }
- }
- }
- }
isHook=>true
**在断点断下后 删除断点**
断点信息
dump from: [string ".\luadebugJit.lua"]:841: in function 'debugger_setBreak'
- "datas" = {
- 1 = {
- "fileName" = "LogonScene.lua"
- "lines" = {
- }
- "serverPath" = "D:/RYclient/client/client/src/plaza/views/LogonScene.lua"<===大写盘符
- }
- }
删除断点结果
dump from: [string ".\luadebugJit.lua"]:869: in function 'debugger_setBreak'
- "breakInfos" = {
- "LogonScene.lua" = {
- "d:/RYclient/client/client/src/plaza/views/LogonScene.lua" = { <===不能匹配小写盘符
- "lines" = {
- 261 = true
- }
- "pathNames" = {
- 1 = "d:"
- 2 = "RYclient"
- 3 = "client"
- 4 = "client"
- 5 = "src"
- 6 = "plaza"
- 7 = "views"
- 8 = "LogonScene.lua"
- }
- }
- }
- }
isHook=>true
**再次添加断点**
断点信息
dump from: [string ".\luadebugJit.lua"]:841: in function 'debugger_setBreak'
- "datas" = {
- 1 = {
- "fileName" = "LogonScene.lua"
- "lines" = {
- 1 = 261
- }
- "serverPath" = "D:/RYclient/client/client/src/plaza/views/LogonScene.lua"<==大写盘符
- }
- }
添加断点结果
dump from: [string ".\luadebugJit.lua"]:869: in function 'debugger_setBreak'
- "breakInfos" = {
- "LogonScene.lua" = {
- "D:/RYclient/client/client/src/plaza/views/LogonScene.lua" = { <============
- "lines" = {
- 261 = true
- }
- "pathNames" = {
- 1 = "D:"
- 2 = "RYclient"
- 3 = "client"
- 4 = "client"
- 5 = "src"
- 6 = "plaza"
- 7 = "views"
- 8 = "LogonScene.lua"
- }
- }
- "d:/RYclient/client/client/src/plaza/views/LogonScene.lua" = { <============
- "lines" = {
- 261 = true
- }
- "pathNames" = {
- 1 = "d:"
- 2 = "RYclient"
- 3 = "client"
- 4 = "client"
- 5 = "src"
- 6 = "plaza"
- 7 = "views"
- 8 = "LogonScene.lua"
- }
- }
- }
- }
isHook=>true
更新到最新版后,按Ctrl 函数不能调到定义处了 ,很不方便
if ets and type(ets) == str_table then --希望在此处的and加个颜色
for k, v in pairs(ets) do
end
end
一直ctrl+是的保存,lua的注释会一直自动加上空格
比如 函数名
local data = require "data"
data.init() -- 这边是可以支持的
function response.create()
data.init()-- 这边不支持代码提示
end
mac。还有断点后再点下一步,如果改方法已经没下一步,不会自动跳到下一个执行的方法
感谢作者大大的辛勤劳动
何时能把0.2.1源码上传上来呢?我想加点feature
local data = require "data"
function get_data(id)
return data
end
local temp_data = get_data(1)
temp_data.init() --这里就没法提示了
一、像if for 这样的,现在在整个队列的最下面。
二、关键字结束需要按ese才能关闭提示,像end 后面会有一堆提示 end
endaa
endbbb 这样子,
之前用visual studio cocos2d-x lua开发可以增加参数设置启动模拟器大小。
如果粘贴的位置是字符串的双引号之间,则会在结束的引号前多一个空格。选中区域快格式化,无此问题。
汉字变量提示意外的字符,不能自动添加注释
点击单步跳过后, 会直接运行到下个新断点才会停,并不会停在下一行(cocos2dx的lua工程,win系统)
local test1 = {}
function test1:func1()
end
return test1
file2使用
mgr.Test1 = require("test1")
mgr.Test1:fun
mgr.Test1:将无法提示
~0xff 例如这样的写法,十六进制数据前面的非符号会是红色的。不知道这个VS Code问题还是LuaIDE问题?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.