Scala+Android: Is anybody successfully building and debugging in Eclipse?

本小妞迷上赌 提交于 2019-12-03 11:24:50

In general debugging Scala code running on Android using Eclipse works well and behaves more or less like debugging Scala on regular (non-Android) applications.

I use sbt with sbt-android and android:start-emulator or android:start-device.

Depending on whether I need to debug the application startup, I set the option to wait for the debugger in the developer settings on the device or emulator. To do this, run "DevTools" / "Development Settings". Select your application and check "Wait for Debugger".

Then you have to select the process to debug in DDMS. Make sure the debug port is shown, and then connect with the Eclipse debugger.

A potential cause for the debugger not installing the breakpoints is that the source code line has no direct equivalent in byte code. For comprehensions come to mind.

Mikaël Mayer

Using AndroidProguardScala, I am successful in debugging, using scala 2.10 and Eclipse 3.7 It also deals with for comprehensions as the usual plugin. See the detailed answer there:

Eclipse, Android, Scala made easy but still does not work

The only missing feature is the new scala debugger in the latest scala eclipse plugin, which is not yet integrated. So for example, to debug a map, you will have to go though files such as Map.scala, ArrayBuffer.scala, Object.scala, and so on.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!