summaryrefslogtreecommitdiff
path: root/xmake/core/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/main.lua')
-rw-r--r--xmake/core/main.lua13
1 files changed, 11 insertions, 2 deletions
diff --git a/xmake/core/main.lua b/xmake/core/main.lua
index bb883d659..796a69b44 100644
--- a/xmake/core/main.lua
+++ b/xmake/core/main.lua
@@ -40,6 +40,7 @@ local config = require("project/config")
local project = require("project/project")
local localcache = require("cache/localcache")
local profiler = require("base/profiler")
+local debugger = require("base/debugger")
-- init the option menu
local menu =
@@ -139,6 +140,14 @@ end
-- the init function for main
function main._init()
+ -- start debugger
+ if debugger:enabled() then
+ local ok, errors = debugger:start()
+ if not ok then
+ return false, errors
+ end
+ end
+
-- disable scheduler first
scheduler:enable(false)
@@ -148,9 +157,9 @@ function main._init()
-- e.g. `xmake f -c -P xxx` will be parsed as `-c=-P`, it's incorrect.
--
-- maybe we will improve this later
- local options, err = main._basicparse()
+ local options, errors = main._basicparse()
if not options then
- return false, err
+ return false, errors
end
-- init project paths only for xmake engine