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

#462 supports debugger attach

parent 2e78c013
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,12 @@
"stopOnEntry": true,
"address": "127.0.0.1:11427",
"outputCapture": [
],
"sourceMaps": [
[
"./*",
"${workspaceFolder}/*"
]
]
},
]
......
......@@ -32,7 +32,7 @@ end
local currentPath = debug.getinfo(1, 'S').source:sub(2)
local fs = require 'bee.filesystem'
local rootPath = fs.path(currentPath):remove_filename():string()
if dll == '.dll' then
if dll == 'dll' then
rootPath = rootPath:gsub('/', '\\')
package.path = rootPath .. script .. '\\?.lua'
.. ';' .. rootPath .. script .. '\\?\\init.lua'
......@@ -50,7 +50,8 @@ package.searchers[2] = function (name)
local f = io.open(filename)
local buf = f:read '*a'
f:close()
local init, err = load(buf, '@' .. name)
local relative = filename:sub(#rootPath + 1)
local init, err = load(buf, '@' .. relative)
if not init then
return err
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment