Eclipse Debugger does not advance on Android application

Asked

Viewed 758 times

2

I’m having a problem trying to debug an Android application in Eclipse. When I press F5, F6 or F8, simply the break point line does not pass to the next instruction (line), it is stopped. I had already used the Eclipse Debug and had never had problems.

Look at the screen image of my Eclipse and the code I’m trying to debug. I tried to summarize, but even so break point does not advance to next line.

Tela do Eclipse

    void init(){
    txtFrequencia = (EditText) findViewById(R.id.editText_Frequencia);
    txtQuantidade = (EditText)findViewById(R.id.editText_Quantidade);
    txtIntervalo = (EditText)findViewById(R.id.editText_Intervalo);
    txtNomeMedicamento = (EditText)findViewById(R.id.editText_NomeMedicamento);
    tmpInicioTratamento = (TimePicker)findViewById(R.id.timePicker_InicioTratamento);
    spnTipoDosagem = (Spinner)findViewById(R.id.spinner_TipoDosagem);
    btnSalvar = (Button)findViewById(R.id.button_salvar_agenda);

    toast = Toast.makeText(this.getApplicationContext(), "Você Apertou o Botão", Toast.LENGTH_SHORT);
    btnSalvar.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {

            add();

        }
    });
}

Note: I have tested in two versions of Eclipse and I am using Windows 8 64 bits

  • Take a look at the Debug tab, there are the Threads that are running. See if you have any with a pause. If you have this could be the problem.

  • How do I fix this? Actually the thread is Suspended

  • Right-click and select Resume.

  • I tried to summarize, but when I hit F5, F6 etc the break point does not change line.

  • See if this helps: http://stackoverflow.com/questions/8551818/how-to-debug-android-application-line-by-line-using-eclipse

  • @user5172 Remember that if you want to say more about your problem (such as the code example you posted) edit your question is always better than adding an answer. It’s the best way to ensure that everyone will read. Welcome to SOPT :)

  • I’ve tried everything already. What I’m now believing this may be an ADT bug or has something to do with the version of the Android app I’m creating. I will create a new application with a lower version to test. I let everyone know about the result.

Show 2 more comments

2 answers

1

In my view you must be with the eclipse shortcut key mapping problem. My suggestion is that you reset to the original settings. in:

Window > Preference > General > Keys

Select the Default Scheme and then click on "Restore Defaults".

If the problem still occurs check if you can follow the next steps by the shortcut in the menu.

inserir a descrição da imagem aqui

  • Even by clicking the toolbar buttons the business does not work.

  • Try to reset the Debug perspective in Eclipse. Another doubt this only happens in an android project? If Voce create a normal java project it runs Debug?

  • Another tip is to activate Debugmode in the project’s manisfest.

  • I tested with a common Java project and it works and in the manifest the debug option was already active

0

The times I’ve had this problem, it can be two things:

  1. The Eclipse window is out of focus. By clicking inside it the commands start working again;
  2. The Thread selected from the Debug perspective is not the same Thread that is suspended. In this case, I had to find in the list the Thread that appears with a yellow pause icon, click on it to have the commands working back.
  • And how do I correct this Thread issue. The thread appears as Suspended.

  • Just click on it and command the F6 either by shortcut or by green play button.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.