Add debuggerflavor API + implement for vstudio

This commit is contained in:
Thomas Desveaux 2018-04-09 17:20:38 +02:00
parent 2ac3153f81
commit ed2b419128
3 changed files with 35 additions and 1 deletions

View File

@ -21,6 +21,19 @@
include("vs2015.lua")
include("vs2017.lua")
p.api.register {
name = "debuggerflavor",
scope = "config",
kind = "string",
allowed = {
"WindowsLocalDebugger",
"WindowsRemoteDebugger",
"WebBrowserDebugger",
"WebServiceDebugger"
}
}
--
-- Decide when the full module should be loaded.
--

View File

@ -101,3 +101,22 @@ foo=bar</LocalDebuggerEnvironment>
]]
end
--
-- Test Debugger Flavor
--
function suite.debuggerFlavor_OnWindowsLocal()
debuggerflavor "WindowsLocalDebugger"
prepare()
test.capture [[
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
]]
end
function suite.debuggerFlavor_OnWindowsRemote()
debuggerflavor "WindowsRemoteDebugger"
prepare()
test.capture [[
<DebuggerFlavor>WindowsRemoteDebugger</DebuggerFlavor>
]]
end

View File

@ -79,7 +79,9 @@
function m.debuggerFlavor(cfg)
if cfg.debugdir or cfg.debugcommand then
if cfg.debuggerflavor then
p.w('<DebuggerFlavor>%s</DebuggerFlavor>', cfg.debuggerflavor)
elseif cfg.debugdir or cfg.debugcommand then
p.w('<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>')
end
end