[INACTIVE][DEV] BeanShellDebugger v2 - Debug bukkit live [670]

Discussion in 'Inactive/Unsupported Plugins' started by deltahat, Mar 15, 2011.

  1. Offline


    BeanShell Debugger - Debug bukkit live
    Version: v1

    BeanShellDebugger gives you complete access to the internal state of a live bukkit server using BeanShell (http://www.beanshell.org/). BSHD is a great tool for debugging plugins and bukkit core. BeanShell is extremely powerful. Read its docs to learn its subtle ways.

    • Evaluate java expressions against the runtime state of bukkit or your plugin
    • Access your server's internal state remotely - even from within MC itself!
    • Extensible scripts automate complex debugging tasks
    1. Download BeanShell 2.0b4 from http://www.beanshell.org/download.html
    2. Put bsh-2.0b4.jar into your root bukkit directory
    3. Put BeanShellDebugger.jar into your bukkit plugin directory
    Connect to BeanShell one of four ways
    1. Web - http://localhost:1337
    2. Telnet - telnet localhost 1338
    3. Server console - bshd java command;
    4. MC Client - /bshd java command;

    A few shortcut symbols have been defined within the BeanShell runtime: pluginLoader, pluginManager, classLoader, and server. Additionally, a symbol is defined for each loaded plugin instance and named the class name of the plugin.

    Most useful command: print(someJavaExpression());

    Any .bsh scripts added to the BeanShellDebugger plugin data folder
    (in the plugins directory) will be loaded into the BeanShell environment and can be used in your queries. This is a great place to write snippets that automate your common commands.

    Scripts I have written can be downloaded from github: https://github.com/rmichela/BeanShellDebugger/tree/master/scripts

    Download the plugin: https://github.com/rmichela/BeanShellDebugger/downloads
    Download the source: https://github.com/rmichela/BeanShellDebugger

    Version 1
    • Initial release
    Version 2
    • Improved bshd command
    • Added a few useful scripts to the /scripts directory on github
    rcjrrjcr and credence like this.
  2. Offline


    awesome! reminds me of mod_bsh for the client.
  3. Offline


    i would love to be able to view the debug for a certain plugin, are there any examples specific to a bukkit server that i could see to get an understanding of how this works?
  4. Offline


    Can you be more specific? With BSD, to debug a plugin you just type the code to access the data you want to see.

    % print(BeanShellDebugger.getLog().getName());
    - "LogName"
    What are some useful scripts people would like to see? I was thinking of implementing desc() to print out all of an object's state and descp() for just the public state.
  5. Offline


    i could really use this to post my plugin and/or bukkit errors (i get a lot!) and post the errors for the plugin makers to see. but ummm how to use it.....i dont know a this about java XD. just how to install it. my server is a remote VPS that i can only access thru putty and core FTP lite
  6. Offline


    @woodzy, I'm not sure BeanShellDebugger would help you much if you aren't a Java developer. The plugin will let you probe the guts of your server remotely, but it uses Java as the language to do that probing.

    BeanShellDebugger v2 released
    • Improved bshd command
    • Added a few useful debugging scripts

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: May 12, 2016
  7. Offline


    This is awesome and all devs should know about this.

    One oddity: bshd doesn't create symbols for plugins which load after bshd itself is enabled. D:
  8. Offline


    considered inactive
  9. Offline


    Hi all -- I have updated this plugin to have more resilient loading in newer craftbukkit. This plugin works for me in the CB 1060 environment.

    For this new version, put the bsh-2.0b4.jar into your plugins/BeanShell Debugger directory. Review the source and change to reset ports.

    IMPORTANT: This plugin has no concept of security. Do NOT deploy this to a public access server! If you *must*, properly firewall/secure the bsh server ports, and disable the /bshd command. As this is a plugin for programmers, I will assume anyone crazy enough to actually do this knows how to follow this advice.

    Source: https://github.com/Zavvy/BeanShellDebugger
    Download: https://github.com/downloads/Zavvy/BeanShellDebugger/BeanShellDebugger.jar
    puyttre likes this.

Share This Page