Native debug on Android – Android Enthusiasts Stack Exchange

It has been a few years since I last needed to debug any native applications on Android. After poking around a bit I found this Google reference referring to gdbserver and

I found the former in the NDK


And the latter in the SDK


When I went to run the python script I am met with:

$ python
Traceback (most recent call last):
  File "", line 27, in <module>
    import gdbrunner
ImportError: No module named gdbrunner

For the life of me I cannot find any information on what gdbrunner is. Nor have I found any other reference to it in the (S/N)DKs.

Any idea? Is there another method to debug native components of Android not reliant upon this script?

sharepoint addin – Create and debug a file handler

How do I create and debug file handlers? I tried following the Microsoft docs, but those docs and anything else I can find are out of date and I can’t tell if I’m missing a step or made an error in the config. I don’t see anything different in OneDrive/Sharepoint.

I also tried a sample file handler but that is also out of date and didn’t show in OneDrive/Sharepoint either.

libgdx – Bullet: Mesh drops after debug lines turn green

My mesh drops after a while when rigid body turns green. Maybe I sound wierd, but I am new to bullet-physics and 3d stuff, and don’t know the actual cause ;P

It happens on using MotionState.
Initial state:

enter image description here

After debugdraw turn green

enter image description here

Here is my code inside render method:

        delta = Math.min(1f / 30f,;

        world.stepSimulation(delta, 5, 1f/60f);
        modelBatch.render(stickobj, environment);

Here is my motion State for stickman:

class StickMotionState extends btMotionState {

    Matrix4 transform;
    float radius;

    StickMotionState(float r){
        radius = r;

    public void getWorldTransform(Matrix4 trans) {
            trans.translate(0, -radius, 0);
    public void setWorldTransform(Matrix4 trans) {

It works fine without explicitly calling,
stickobj.body.getMotionState().getWorldTransform(stickobj.transform); as Xoppa stated in this tutorial, but then my model is offset a little bit.

enter image description here

Also, I don’t want to offset origin in blender due to increased calulations in placing them in game.
PS: What does that green colour signifies šŸ˜›

How I debug a mongodb slow regex query?

I have two simple queries on a collection of 22 millions documents.

query 1:

db.audits.find({"w.em": /^name.lastname/i})

return in less than 1 second.

query 2:

db.audits.find({"w.d": /^name.lastname/i})

it runs for more than 30seconds (and rightly not found results).

The only difference on the two queries is the field I am searching on. Both fields are indexed, you can find here the explain for both : it is identical!

How can the queries perform so differently??

I am on mongodb 3.4.23

performance – How do I further debug this Internal Server Error problem? (mod_fcgid related)

I was asked to help with a Drupal 7 site that I’ve helped to tweak several times before. The problem is, most of the site pages are not shown and “Internal Server Error” 500 page is shown instead (it started at the 6th of may). There are some exceptions though:

/user  (but not /user/1 for example)
/admin/modules  (but not  /admin/config or /admin/reports)

(may be these are not all the exceptions, but I don’t know others yet)

Now, here’s what I know (I don’t have full root access, but I can request access for some resources):

  • PHPMyAdmin shows over 10K requests per minute (84% are select, 6% delete, 6% insert, ..). By the way, it also shows that it was started at the 7th of May (may be administrator has rebooted it)

  • httpd access_log consists of lines like (I splitted into 2 for readability)

    ::1 - - (13/May/2020:02:07:32 +0300) "OPTIONS * HTTP/1.0" 200 - "-"
     "Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/5.4.16 (internal dummy connection)"

    it seems there’s nothing except these ones; these ones are added with frequency of about 5-20 lines per second

  • httpd error_log consists mostly of lines like

    (Wed May 13 09:16:09.487641 2020) (fcgid:warn) (pid 27860) mod_fcgid: process 25947 graceful kill fail, sending SIGKILL

    and these are added even less frequently: about 10 times per hour

  • processor is highly loaded: it varies from 10% to 75% CPU consumed by /usr/bin/php-cgi php (which can be seen by using /usr/bin/php-cgi php)

Looks like something’s wrong with mod_fcgid, but I have very little idea of what I can do to debug and fix this. Can anybody help with this?

magento2 – Why is X-Magento cache debug displayed in production mode?

I have configured paint on my server and my project is running in Production modeeven though I still see the debug tag X-Magento-Cache-Debug in the header.

Magento 2 production mode

Magento 2 Lack X-Magento cache debug

According to Devdocs – Varnish Final review, this header tag is only shown in developer mode.

Why does it happen and how can I solve it?
Thanks a lot

php – How can I improve the accuracy of the debug log timestamp?

Sometimes I write information in the debug log to diagnose problems. When working on a performance problem, the resolution in hours: minutes: seconds is not enough. I'd like to reach milliseconds, but haven't found a place to make the change yet. Ideas?

FWIW, this is the standard time stamp: [08-May-2020 23:16:38 UTC]

THANKS for every advice.

debian – preseed / late_command oh-my-zsh / debug

I can't seem to install oh-my-zsh properly d-i preseed/late_command. zsh and chsh work fine like all my other late_commands, but somehow the repo is not cloned and the installation does not take place.

I don't really know how to debug it as there are no errors (which would appear at the end of the installation process) and the computer just restarts and works normally, but without oh-my-zsh. Here are the preparatory interesting parts:

d-i preseed/late_command string 
apt-install zsh; 
in-target sh -c "mkdir -m 700 /root/.ssh ; echo 'ssh-rsa SOME_KEYS' > /root/.ssh/authorized_keys ; chmod 600 /root/.ssh/authorized_keys"; 
in-target sh -c "$(curl -fsSL"; 
in-target sh -c 'echo '"'"'PROMPT="%{$fg(magenta)%}%n%{$reset_color%} at %{$fg(yellow)%}%m%{$reset_color%} ${ret_status} %{$fg(cyan)%}%c%{$reset_color%} $(git_prompt_info)"'"'"' >> /root/.zshrc'; 
in-target sh -c 'echo '"'"'export PATH=$PATH:/usr/sbin'"'"' >> ~/.zshrc'; 
in-target chsh -s /bin/zsh;
  1. SSH key works great
  2. ~/.zshrc The file is only created with the PROMPT Variable and the export PATH... little
  3. wget and curl are both installed over d-i pkgsel/include string and are available as soon as you log in for the first time.
  4. My shell at boot is zsh

P.S. : It is a Debian installation.

Debug – I can't debug in Visual Studio.

I am trying to debug the following code

using System;
namespace jogosimulaƧao_princƭpios
    public class Janela1
        public Janela1()
            static void Main(string() args)
                Console.WriteLine("Primeiro Teste!");


In Visual Studio, when trying to debug this way, an error message appears because the button to start debugging is disabled. By the way, I couldn't even print the error because it is no longer displayed:
Insert picture description here