Skip to content
Snippets Groups Projects
Commit 52c24177 authored by 最萌小汐's avatar 最萌小汐
Browse files

update launch setting

parent ad58184e
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
"request": "launch",
"stopOnEntry": false,
"program": "${workspaceRoot}/test.lua",
"luaexe": "${workspaceFolder}/bin/Windows/lua-language-server.exe",
"cpath": "${workspaceFolder}/bin/Windows/?.dll",
"arg": [
],
"luaVersion": "latest",
......@@ -24,7 +24,7 @@
"type": "lua",
"request": "attach",
"stopOnEntry": true,
"address": "127.0.0.1:11556",
"address": "127.0.0.1:11413",
"outputCapture": [
],
"sourceMaps": [
......
......@@ -9,21 +9,18 @@ local function findExePath()
end
local exePath = findExePath()
local exeDir = exePath:match('(.+)[/\\][%w_.-]+$')
local dll = package.cpath:match '[/\\]%?%.([a-z]+)'
package.cpath = ('%s/?.%s'):format(exeDir, dll)
local ok, err = package.loadlib(exeDir..'/bee.'..dll, 'luaopen_bee_platform')
local bee = package.searchpath('bee', package.cpath)
local ok, err = package.loadlib(bee, 'luaopen_bee_platform')
if not ok then
error(([[It doesn't seem to support your OS, please build it in your OS, see https://github.com/sumneko/vscode-lua/wiki/Build
errorMsg: %s
exePath: %s
exeDir: %s
dll: %s
cpath: %s
]]):format(
err,
exePath,
exeDir,
dll,
package.cpath
))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment