Running/Debugging Scala programs within intellij on Mac
I have installed the scala and the scala application runner plugin sboth on my windows XP laptop and my Mac OSX (intel) desktop machine.
On the XP machine I am able to run and debug my scala code, but on my Mac, the only options I get are to compile and to run the scala console.
Is there some bit of configuration I missed, or does run/debug not work on the mac?
I have tested this by building exactly the same single file program on both:
(adapted from Venkat Subramaniam's "programming Scala"
package Chapter4
/**
* User: charlesp
* Date: Aug 26, 2009
* Time: 4:28:36 PM
*/
trait Friend {
val name: String
def listen() = println("Your friend " + name + " is listening")
}
class Human(val name: String) extends Friend
class Man(override val name: String) extends Human(name)
class Woman(override val name: String) extends Human(name)
class Animal
class Dog(val name: String) extends Animal with Friend {
//optionally override method here.
override def listen = println(name + "'s listening quietly")
}
class Cat(val name: String) extends Animal
object TraitTest {
val john = new Man("John")
val sara = new Woman("Sara")
val comet = new Dog("Comet")
john.listen
sara.listen
comet.listen
val mansBestFriend : Friend = comet
mansBestFriend.listen
val snowy = new Cat("Snowy") with Friend
val friend : Friend = snowy
friend.listen
val snowbell: Friend = new Cat("Snowbell") with Friend
snowbell.listen
def main(args: Array[String]) {
}
}
请先登录再写评论。
Hello, Charles.
Presumably, first you have to do is to uninstal scala app. runner plugin - it's third party plugin, whose functionality is fully implemented in last version of Scala plugin itself, and moreover it may clash with existing implementation which causes errors.
Regards,
Ilya
Ilya,
Getting rid of the old plugin solved it.
Thanks,
Charles