vassalengine / vassal

VASSAL, the open-source boardgame engine
https://vassalengine.org
GNU Lesser General Public License v2.1
426 stars 101 forks source link

Debugger Beanshell interpreter #12554

Open riverwanderer opened 1 year ago

riverwanderer commented 1 year ago

Provide a beanshell mode from the debugger.

Ideas for consideration:

  1. Beanshell mode - Debugger command (e.g. /beanshell in the chat starts a command mode where any string is interpreted as beanshell. The beanshell is executed in the context of the selected piece(s), if any, or at module level (?) if none. Output displayed in similar fashion to /property [select] show. Exit to chat via a suitable escape character entered in the chat input bar.

  2. As above but additionally some special commands to set the beanshell environment from within the interpreter: exit (back to chat mode), map [map name], zone [zone name] ... these are perhaps redundant, as the same effect could be achieved by moving a dummy piece to the required map / zone and selecting it (no. 1 above).

  3. Beanshell debugger one-off command e.g. /beanshell [select] {[expression]}

BrentEaston commented 1 year ago

Excellent idea!