title: Attach to Android process from Qt Creator
body: <p>I use Qt Creator to develop an Android dynamic library, i.e. a .so file. This .so file is then used by an Android application, but that is developed in Eclipse.</p>
  
  <p>I need to debug my native code, but since it's a library, I can't start the application from Qt Creator, I <strong>must attach to the already running process</strong>.</p>
  
  <p>Now, if it were a desktop application, I'd use <code>Debug-&gt;Start Debugging-&gt;Attach to Running Application</code>, but how do I attach to an Android process, which would be running on the emulator or on a connected phone, which is more like remote-debugging?</p>
  
  <p>I think that I should use <code>Debug-&gt;Start Debugging-&gt;Attach to Running Debug Server</code>:</p>
  
  <p><a href="https://i.stack.imgur.com/4vQYl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4vQYl.png" alt="enter image description here"></a></p>
  
  <p>However, I'm not sure what the exact steps are - how do I start a debug server for ADB, and which port do I connect to?</p>