Unable to check variables in scala code in Eclipse

When I debug a Scala application in eclipse, I get a dialog with this message at startup: it is not possible to set breakpoints in Main due to the absence of line number artifacts.

When I try to examine variables, I get this error in the expression window: "[in Main [in [Working copy] Main.scala [in [in src [in Scala1]]]]] does not exist"

I tried setting various debug level options for the Scala compiler, including "line" and the highest setting, but it doesn't seem to make any difference. I was able to see the contents once after I entered the settings, but could not do it again, so I wonder if there is an error somewhere with a bad cached state.

I am using the Indigo service release for Eclipse with the Scala plugin version 2.0.0v2_09.

+6
source share
2 answers

You must update the new version of Scala IDE!

(strict) Prior to 3.0.0, the debugger was a Java debugger, without specific Scala support. But ScalaIDE 3.0.0 comes with a Scala debugger that should alleviate the problems you are talking about, especially well-placed breakpoints. You can read the release notes for 3.0.0 describing the debugger .

You should even try the candidate version version 3.0.1, which contains fixes for the debugger, in particular, skipping breakpoints. Try it, and if there are any problems, you can use the IDE command on the mailing list or the question file or ask another SO question!

+2
source

You can download the Scala IDE for eclipse using the Scala Worksheet, preinstalled at the following URL:

enter link description here // URL from Scala course in coursera

With Scala Worksheet, you can create worksheets and watch var at the same time as the code.

0
source

Source: https://habr.com/ru/post/918906/


All Articles