Rhino is an open-source implementation of JavaScript written entirely in Java
4.18k
stars
851
forks
source link
Custom .toSting behavior for (overloaded) Java methods in the shell (for easier development/debugging) #1554
Open
tuchida opened 3 months ago
ref. https://github.com/mozilla/rhino/pull/1537#issuecomment-2260194670 Debugging with JavaScript
toString
is subject to the constraints of the ECMA 262 specification. Therefore, it is difficult to debugJavaObject
/JavaClass
/JavaMethod
, etc. without violating the specification. Withconsole.log
, the implementation can decide on a useful format. https://console.spec.whatwg.org/#printerThis is a prototype. If it looks good to you, brush up and make a Pull Requst. https://github.com/mozilla/rhino/compare/master...tuchida:debugging-java-using-console?expand=1