summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-02-28 10:37:09 +0100
committermadmaxoft <github@xoft.cz>2014-02-28 10:37:09 +0100
commite4c3d3eb6decddddc986f1020f3fb30af48bbe4b (patch)
tree5ceb3ff0780987f8012f65378f90eab09c5b8cd1 /MCServer/Plugins
parentBetter fix for the 32-bit float reading. (diff)
downloadcuberite-e4c3d3eb6decddddc986f1020f3fb30af48bbe4b.tar
cuberite-e4c3d3eb6decddddc986f1020f3fb30af48bbe4b.tar.gz
cuberite-e4c3d3eb6decddddc986f1020f3fb30af48bbe4b.tar.bz2
cuberite-e4c3d3eb6decddddc986f1020f3fb30af48bbe4b.tar.lz
cuberite-e4c3d3eb6decddddc986f1020f3fb30af48bbe4b.tar.xz
cuberite-e4c3d3eb6decddddc986f1020f3fb30af48bbe4b.tar.zst
cuberite-e4c3d3eb6decddddc986f1020f3fb30af48bbe4b.zip
Diffstat (limited to '')
-rw-r--r--MCServer/Plugins/@EnableMobDebug.lua29
1 files changed, 29 insertions, 0 deletions
diff --git a/MCServer/Plugins/@EnableMobDebug.lua b/MCServer/Plugins/@EnableMobDebug.lua
new file mode 100644
index 000000000..48d4c36b7
--- /dev/null
+++ b/MCServer/Plugins/@EnableMobDebug.lua
@@ -0,0 +1,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
+
+
+
+