This plugin is very pretty, Thank for author. I use it to learn lua and cocos2dx. But when i debug cocos2dx code, i fail. There are my steps.
(1) download vscode-debuggee.lua and dkjson.lua , put into my src folder.
(2) add follow code in main.lua:
cc.FileUtils:getInstance():setPopupNotify(false)
require "config"
require "cocos.init"
local json = require 'dkjson'
local debuggee = require 'vscode-debuggee'
local startResult, breakerType = debuggee.start(json)
print('debuggee start ->', startResult, breakerType)
local function main()
require("app.MyApp"):create():run()
end
local status, msg = xpcall(main, __G__TRACKBACK__)
if not status then
print(msg)
end
This plugin is very pretty, Thank for author. I use it to learn lua and cocos2dx. But when i debug cocos2dx code, i fail. There are my steps. (1) download
vscode-debuggee.lua
anddkjson.lua
, put into mysrc
folder. (2) add follow code inmain.lua
:(3) launch.json:
When run it, the result is follow. I fail to debug.