debug-utils


License

License

GroupId

GroupId

com.kubukoz
ArtifactId

ArtifactId

debug-utils_2.12
Last Version

Last Version

1.1.3
Release Date

Release Date

Type

Type

jar
Description

Description

debug-utils
debug-utils
Project URL

Project URL

https://github.com/kubukoz/debug-utils
Project Organization

Project Organization

com.kubukoz
Source Code Management

Source Code Management

https://github.com/kubukoz/debug-utils

Download debug-utils_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.kubukoz/debug-utils_2.12/ -->
<dependency>
    <groupId>com.kubukoz</groupId>
    <artifactId>debug-utils_2.12</artifactId>
    <version>1.1.3</version>
</dependency>
// https://jarcasting.com/artifacts/com.kubukoz/debug-utils_2.12/
implementation 'com.kubukoz:debug-utils_2.12:1.1.3'
// https://jarcasting.com/artifacts/com.kubukoz/debug-utils_2.12/
implementation ("com.kubukoz:debug-utils_2.12:1.1.3")
'com.kubukoz:debug-utils_2.12:jar:1.1.3'
<dependency org="com.kubukoz" name="debug-utils_2.12" rev="1.1.3">
  <artifact name="debug-utils_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.kubukoz', module='debug-utils_2.12', version='1.1.3')
)
libraryDependencies += "com.kubukoz" % "debug-utils_2.12" % "1.1.3"
[com.kubukoz/debug-utils_2.12 "1.1.3"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.13
org.scala-lang : scala-reflect jar 2.12.13

Project Modules

There are no modules declared in this project.

debug-utils

License

Just some utilities for debugging daily development issues in Scala.

"com.kubukoz" %% "debug-utils" % "1.1.3"

Published for Scala 2.12, 2.13, 3.0.0-RC2 and 3.0.0.

Usage

Note: There's another library that does a better job at this - see macrolizer

withDesugar

Wrapping an expression in withDesugar will print its desugared (scala 3: fully elaborated) form at compile time.

In Scala 2.x, the code will be printed at INFO level.

Due to the changes in Scala 3's metaprogramming, the desugared code is printed as a warning.

import com.kubukoz.DebugUtils

def demo = DebugUtils.withDesugar(
  println(
    implicitly[ValueOf[42]].value
  )
)

// The above shows (in Scala 3.x):
// scala.Predef.println(scala.Predef.implicitly[scala.ValueOf[42]](new scala.ValueOf[42](42)).value)

Versions

Version
1.1.3
1.1.2
1.1.1
1.1.0
1.0.0