v4.0.0
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
, orfoo
instead ofexample$Foo$foo
) - original types before erasure (e.g.,
List[String]
instead ofList[Object]
, orString | Null
instead ofString
) - lists of type parameters (e.g.,
[T]
) - lists of parameters, including
implicit
andusing
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>
)
Runtime evaluator
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
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.
New Contributors
- @aymanelamyaghri made their first contribution in #430
- @crt-31 made their first contribution in #615
What's Changed
- Runtime evaluator by @iusildra in #405
- Add stack-trace formatter by @aymanelamyaghri in #430
- Module lookup fix by @iusildra in #434
- Pre evaluation by @iusildra in #439
- Update scala-compiler, scala-library, ... to 2.12.18 by @scala-center-steward in #448
- Hierarchy overloads resolution by @iusildra in #440
- Update scala-compiler, scala-library, ... to 2.13.11 by @scala-center-steward in #449
- Method boxing overloads + added private methods by @iusildra in #450
- Bump Scala versions by @adpi2 in #458
- Refactor ScalaStepFilterBridge and its tests by @adpi2 in #461
- Rename scala-debug-step-filter to scala-debug-unpickler by @adpi2 in #460
- Apply method and arrays by @iusildra in #456
- Array add to watch expression by @iusildra in #457
- Pre evaluate outer and Extends new evaluation by @iusildra in #466
- Evaluate flow control by @iusildra in #472
- Fix unexpected static member access by @iusildra in #476
- Evaluate blocks by @iusildra in #477
- Add formatting for Tuples and find and format class and trait initial… by @aymanelamyaghri in #490
- Update Java versions on CI by @adpi2 in #482
- Fix #491: Differentiate getter and method with same name by @adpi2 in #494
- format operator like types by @aymanelamyaghri in #493* Format default values by @aymanelamyaghri in #492
- Log exceptions by @iusildra in #481
- Stop running scripted tests on Windows with Java 17 by @adpi2 in #505
- Multiple outers by @iusildra in #495
- Enhance class search by @iusildra in #484
- find-and-format-local-methods by @aymanelamyaghri in #502
- Add support for
-language:strictEquality
by @adpi2 in #510 - Fix evaluation of private value classes in Scala 3 by @adpi2 in #511
- Scala212 sbt190 by @iusildra in #515
- added -g javac option & updated bin/scalafmt by @iusildra in #514
- Fix #485: local $outer and public members from private subclass by @adpi2 in #518
- Introduce binary abstraction in unpickler by @adpi2 in #520
- no transform when inline by @iusildra in #522
- allow step into in classes with special names by @iusildra in #524
- Skip private accessors by @iusildra in #521
- find-symbol-local-class by @aymanelamyaghri in #527
- Skip given lazy val getter by @iusildra in #525
- Evaluation of static members by @adpi2 in #532
- Add stats for Scala3Unpickler and fix find local enum by @aymanelamyaghri in #533
- Fix evaluation on extractor by @adpi2 in #534
- Fix format local method with unloaded parameters + refactor some tests by @adpi2 in #536
- Skip
ScalaRunTime.wrapRefArray
and skiploadClass
on creation of arrays by @adpi2 in #539 - Re-use hot filesystem to read sources by @adpi2 in #544
- [sbt plugin] Fix debug main class in test scope by @adpi2 in #545
- Runtime assign by @iusildra in #542
- fix evaluation in static context by @iusildra in #549
- fix ci by @iusildra in #554
- fix bug local method with captured parameters by @aymanelamyaghri in #550
- find anonymous function symbols by @aymanelamyaghri in #558
- Add source lines by @adpi2 in #557
- Anon class by @aymanelamyaghri in #562
- find inlined local symbols by @aymanelamyaghri in #563
- Introduce binary symbol by @aymanelamyaghri in #565
- Hot code replace by @iusildra in #553
- find mixing forwarders and use SourcePosition by @aymanelamyaghri in #568
- rework formatting by @aymanelamyaghri in #571
- find outter getters symbols by @aymanelamyaghri in #572
- Bump actions/checkout from 3 to 4 by @dependabot in #590
- Test no reload when no changes & refresh breakpoints by @iusildra in #581
- Skip exported methods and BoxeRuntimes by @iusildra in #594
- added a skip-ci by @iusildra in #610
- Make ClassEntryLookup accommodate case-insensitive lookups where appropriate by @crt-31 in #615
- Log debuggee command with info level by @adpi2 in #616
- Better stack trace by @adpi2 in #599
- Update scala versions by @adpi2 in #627
- Refactor runtime evaluator by @adpi2 in #629
- More refactoring in RuntimeValidation by @adpi2 in #630
- Add support for Scala 3.4 by @adpi2 in #633
- Update scala3-compiler, scala3-library to 3.4.0-RC3 by @scala-center-steward in #634
- Update scala3-compiler, scala3-library to 3.4.0-RC4 by @scala-center-steward in #637
- Update tasty-query to 1.2.1 by @scala-center-steward in #636
- Fix variables and rework runtime evaluation errors by @adpi2 in #635
- [Runtime Evaluation] add support for null arg by @adpi2 in #646
- Unwrap invocation exception in runtime evaluation by @adpi2 in #648
- Reinstall all breakpoints in files that changed by @adpi2 in #655
- Rename unpickler to decoder by @adpi2 in #656
Full Changelog: v3.1.3...v4.0.0