Find the right way to make plugins debuggable
Closed this issue · 0 comments
The biggest issue on diagnosing issues in JUCE based plugins is that it is impossible to debug with Android Studio for some reason. Some reason actually is, debugging plugin requires apps kept alive while debugging the service part but it is somehow not possible.
(1) Usually when I debug LV2-based plugins, I launch standalone app activity, then go back to home screen (or app list) to launch a host to connect to the plugin service. The service is still alive and I can simply add android.os.Debug.waitForDebugger()
in MainActivity
with no problem.
(2) But the Main Activity (JuceActivity) from JUCE-based plugin apps, if I go back to home screen or app list, it terminates the application and debugger stops. Even after I modify app AndroidManifest.xml
and make the Activity launchMode='standard'
.
(3) If I create another launch configuration that does not launch main-launcher Activity and add android.os.Debug.waitForDebugger()
at JuceApp.onCreate()
, the debugger still often does not break and I have no idea why.
It may depend on call to Java.initialiseJUCE (this)
in JuceApp
but we need some solid debugging experience.