summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/@EnableMobDebug.lua
blob: 48d4c36b7f5af64d8f4e8f0e97ee5153d077e497 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

-- @EnableMobDebug.lua

-- Enables the MobDebug debugger, used by ZeroBrane Studio, for a plugin
-- Needs to be named with a @ at the start so that it's loaded as the first file of the plugin

--[[
Usage:
Copy this file to your plugin's folder when you want to debug that plugin
You should neither check this file into the plugin's version control system,
nor distribute it in the final release.
--]]





-- Try to load the debugger, be silent about failures:
local IsSuccess, MobDebug = pcall(require, "mobdebug")
if (IsSuccess) then
	MobDebug.start()
	
	-- The debugger will automatically put a breakpoint on this line, use this opportunity to set more breakpoints in your code
	LOG(cPluginManager:GetCurrentPlugin():GetName() .. ": MobDebug enabled")
end