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

前端 未结 2 1810
北恋
北恋 2021-02-14 01:16

So far, the only way I\'ve been able to debug within Eclipse is to use Treeshaker with Scala IDE\'s buggy 2.8 branch. If I try to build with Scala IDE without Treeshaker, I get

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-14 01:44

    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.

提交回复
热议问题