summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/@EnableMobDebug.lua
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-03-01 18:48:44 +0100
committerTycho <work.tycho+git@gmail.com>2014-03-01 18:48:44 +0100
commit0d26e81ab56f7a945af23034878e0487aa65800f (patch)
tree2acb54403850d8225d9d445e97ede81fe12c5934 /MCServer/Plugins/@EnableMobDebug.lua
parentFinal implementation of MetaRotater (diff)
parentMerge pull request #735 from xdot/master (diff)
downloadcuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar
cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.gz
cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.bz2
cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.lz
cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.xz
cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.tar.zst
cuberite-0d26e81ab56f7a945af23034878e0487aa65800f.zip
Diffstat (limited to 'MCServer/Plugins/@EnableMobDebug.lua')
-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
+
+
+
+