In order to prevent from incompatible changes, that would break nashorn debugging, please create debugger API classes, or classify existing classes as debugger API.
It does not have to be a public API as such, but standardized classes, that will not change in an incompatible way in the future.
For the debugger, it's much more easy and much faster to access field values, than to invoke method calls. Therefore, it's best in form of fields, where possible.
For the debugging purposes we use following classes, methods and fields:
and it's methods: "valueInfo()", "valueInfos()", "eval()", "valueAsString()"
and it's fields: "key", "expandable", "valueAsObject", "valueAsString"
we rely on that an instance of this class is in "source" static field of every compiled script class
and it's fields: "name", "hash", "data"
and fields "array", "url" in classes implementing jdk.nashorn.internal.runtime.Source$Data
and it's methods: "invoke()", "construct()", "getGenericInvoker()", "getGenericConstructor()"
and it's fields "member", "clazz"
And we rely on that the compiled scripts are in classes, whose canonical path starts with: