Android Debug any program

Source: Internet
Author: User

To do the Android development debug is unavoidable sometimes want to know someone else's program or want to debug the system code how to do?


Now let's talk about how to debug our own program


1. For example, we have our own package name is Com.example.testjava We do not use the debug as method to open the DDMS directly below the breakpoint to select our process and then click on the Green Bug-like button on the top

You can debug with the next breakpoint


2. But sometimes we don't just want to debug our programs, like debugging other people's programs or trying to debug the system's code when we decompile.

Take system.process. If we have downloaded the source code want to start debug but we select the system.process process click the Debug button will jump out of this dialog box to tell us that we can not debug



In this case, we also set a breakpoint in the source code will not debug how to do it?


We can use the following method to select the process we want to debug in Ddms and then do not click the Debug button we go back to the Java view click on the Project Right button debug as-> Debug Config


The following dialog box pops up:


If we double-click the remote Java application, we'll set up a remoting port. We're going to have to project our project to debug. The port below is set to 8700 and then click Debug in the lower-right corner to debug.

Back in the DDMS view, we'll find that the process we selected has the debug sign.


In this way we can easily debug the system code and other APK process code. OK, let's say so much today, bye.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.