12

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);
    ...
}
Eagle-Eye
  • 1,468
  • 2
  • 18
  • 26
zhucai
  • 121
  • 4

2 Answers2

2

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.

j0k
  • 22,600
  • 28
  • 79
  • 90
Dave C
  • 21
  • 4
  • I can't get it to work either, even with samples that run perfectly. I tried explicitly with `` even though it complains about that being a bad practice since it automatically does it now. `#include "rs_debug.rsh"` with no slash, right? I get a compile error with the slash (hey, I have tried everything at this point). – Tim Trueman Jul 08 '15 at 21:40
1

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

Denis Lukenich
  • 3,084
  • 1
  • 20
  • 38