Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ILoop.break hangs after the first command #6435

Closed
scabug opened this issue Sep 27, 2012 · 3 comments
Closed

ILoop.break hangs after the first command #6435

scabug opened this issue Sep 27, 2012 · 3 comments
Assignees

Comments

@scabug
Copy link

scabug commented Sep 27, 2012

OS: ubuntu 12.04
Scala 2.9.2

I was trying to spawn a scala shell in my code for debugging purposes. I tried with the following snippet of code, but the debug> shell that I get hangs after the first command. See the output below.

import scala.tools.nsc.interpreter.ILoop._
import scala.tools.nsc.interpreter.NamedParam

object TestDebugger {
  def main(args: Array[String]) {
    0 to 10 foreach { i =>
      breakIf(i == 5, NamedParam("i", i))
      println(i)
    }
  }
}
$ scala /tmp/test.scala 
0
1
2
3
4
Debug repl starting.  Binding 1 value.
i: Int = 5

debug> i
(it doesn't accept any input + it doesn't terminate)

any help is appreciated. thanks.
cheers,
Yanick

@scabug
Copy link
Author

scabug commented Sep 27, 2012

Imported From: https://issues.scala-lang.org/browse/SI-6435?orig=1
Reporter: Yanick Fratantonio (reyammer)
Affected Versions: 2.9.2

@scabug
Copy link
Author

scabug commented Oct 2, 2012

@retronym said:
break / breakIf were removed altogether in 2.10.

scala/scala@3e038d8#L16L1025

So we'll have to close this one as "out of scope".

@scabug scabug closed this as completed Oct 2, 2012
@scabug
Copy link
Author

scabug commented Sep 5, 2013

Ben Hutchison (ben_hutchison) said:
I saw very similar hanging behavior today in 2.10. The setting that resolved it for me was:

repl.settings.Yreplsync.value = true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants