zhucai
zhucai

Reputation: 121

Why doesn't rsDebug work?

I've inserted an rsDebug method in the Android RenderScript sample "Fountain", but I'm getting no messages out of logcat.

Here's a code snippet to demonstrate what I've tried:

int root() {
    float dt = min(rsGetDt(), 0.1f);
    rsDebug("dt", dt);
    ...
}

Upvotes: 12

Views: 1353

Answers (2)

Denis Lukenich
Denis Lukenich

Reputation: 3174

Besides the answer of Dave i want add following hint:

Messages in renderscript are outputted in the "Verbose"-level. So it may be easy to ignore them because you are in the wrong level.

So in Android Studio you can change the logcat-output here:

enter image description here

Upvotes: 1

Dave C
Dave C

Reputation: 21

I have been working with the renderscript example CarouselView example from here and here is what I did to get rsDebug to work:

  1. Added debuggable="true" to the application tag in the manifest file:

    <application android:debuggable="true">
    
  2. Added

    \#include "rs_debug.rsh" 
    

to the carousel.rs renderscript file.

Upvotes: 2

Related Questions