settings.maxPrintString for Scala 2.9 REPL

前端 未结 1 1737
野的像风
野的像风 2020-12-25 15:24

I\'d like to disable truncation of string values in the Scala REPL.

The following thread suggested typing settings.maxPrintString = 0:

How to fo

1条回答
  •  自闭症患者
    2020-12-25 15:40

      ~/code/scala scala29
    Welcome to Scala version 2.9.1.final (Java HotSpot(TM) 64-Bit Server VM, Java 1.6.0_29).
    Type in expressions to have them evaluated.
    Type :help for more information.
    
    scala> :power
    ** Power User mode enabled - BEEP BOOP SPIZ **
    ** :phase has been set to 'typer'.          **
    ** scala.tools.nsc._ has been imported      **
    ** global._ and definitions._ also imported **
    ** Try  :help,  vals.,  power.    **
    
        scala> vals.isettings.maxPrintString
    maxPrintString     maxPrintString_=   
    
    scala> vals.isettings.maxPrintString = 10000
    vals.isettings.maxPrintString: Int = 10000
    

    or

    $ scala -uniqid -Xprint:typer -Yshow-syms -Dscala.repl.maxprintstring=64000
    

    where the sample output will show truncation without the higher limit.

    0 讨论(0)
提交回复
热议问题