Debugging in Android Studio 3 using cocos2dx

Hi
I’m using cocos2dx v3.17.2 and Android Studio 3.
I’ve managed to compile, build and sign apk’s and bundles.
Now I wish to have the option to debug the application using usb + device (I’m using Huawei P10).
I’ve managed to run the debugger but phone states it: “Wait for debugger process to attach”. Naturally, I then tried the “Attach Debugger to Android Process” action (while debug is running) but it seems to fail - the application doesn’t start and I get a black screen.

Did anyone manage to make it work? what am I missing here?

Not 100% sure, but I think i had an similar or related issue with my P10 Lite, where attaching the debugger failed and therefore couldn’t debug at all (but the game did run fine). It worked for any other phone tho. I ended up getting a new test device or using an other one since I couldn’t find anything besides an “chineses”(i think) post without an solution:

(my original xda post about this, the chinese huawei forum post seems not to be available anymore)

Haven’t tried debugging on my P10 Lite since then, since it took too much time and similar stuff happened before after every OS update