SpigotSpy is a runtime debugging tool that injects logging into any method on your Minecraft server. No restarts, no recompilation. Just debugging.
SpigotSpy supports two forms of logging:
- Value-based logging, which checks variable values and method return values.
- Stack trace logging, which prints a stack trace when the target method is called.
To use these, the user can interact with commands:
/spigotspy logvalues <fullyQualifiedMethodName>/spigotspy logstacktrace <fullyQualifiedMethodName>/spigotspy resetclass <fullyQualifiedClassName>
Fully qualified class/method names
A fully qualified class name is the JVM's path to a class. It is essential that when the user points to a method they'd like to log or a class they'd like to reset, they use the fully-qualified name.
Fully qualified class name examples:
org.bukkit.Bukkitme.redot.spigotspy.SpigotSpyPlugin
Fully qualified method name examples:
org.bukkit.Bukkit.getOnlinePlayersme.redot.spigotspy.SpigotSpyPlugin#onEnable
Pro tip: in IntelliJ, Ctrl + Alt + Shift + C will copy these references for you!
Because nobody wants to re-compile their sources just to add some logging. Instead of that, just run a command and check console.
Make sure to reset the classes afterward for performance and peace of mind. This can spam console a lot.
Sincerely,
Redot ❤️