Skip to content

v4.0.0

Compare
Choose a tag to compare
@adpi2 adpi2 released this 13 Feb 09:01
· 319 commits to main since this release
4bfc0bc

Highlights

Pretty stacktraces (Scala 3 Only)

by @aymanelamyaghri and @adpi2

The Scala Debug Adapter can now decode binary methods to TASTy symbols and format them accordingly.

The pretty stacktraces contain:

  • source names instead of binary names (e.g., <= instead of $less$equal, or foo instead of example$Foo$foo)
  • original types before erasure (e.g., List[String] instead of List[Object], or String | Null instead of String)
  • lists of type parameters (e.g., [T])
  • lists of parameters, including implicit and using keywords (e.g. (xs: List[String])(using Context) instead of (xs: List[Object], evidence$1 : Context))
  • return types
  • Additional information for method that are generated by the compiler. (e.g., <lazy init>, <default 2>)

image

Runtime evaluator

by @iusildra and @adpi2

It allows evaluating Java-like expression in Scala and Java source files without using the compiler. It is faster, it can access private members, and it does not require casting to access members of runtime types.

The runtime evaluator can access variables and fields, it can assign values to them, it can call methods and it can create new instances.

The Scala Debug Adapter uses the runtime evaluator to evaluate simple expression and it falls back to the compiler-based evaluator to evaluate pure Scala expressions (overload resolution, pattern matching, lambda instantiation, implicit resolution, macro expansion etc).

Hot-code replace

by @iusildra and @adpi2

The hot-code replace feature allows to change the behavior of a running program. It is now possible to change the body of a method, and to reload it in the debugged program. After the hot-code replacement, any call to the modified method will execute the new implementation, even on former instances of the changed class.

This feature is particularly useful to track a bug and fix it in a single debug session.

image

New Contributors

What's Changed

Full Changelog: v3.1.3...v4.0.0