In Eclipse, how can I write a debug statement to a console window? I tried:
System.out.print(urls);
System.out.println(urls);
Log.d("tag", urls);
But I don't see the values being displayed anywhere.
Thanks.
Go to Common tab. Then under "Standard Input and Output" section, click on checkbox next to "Output File:", and choose the name of output file to use. If you check "Append" underneath, console output will be appended to the output file. Otherwise, console output will be overwritten to the file.
Follow the following process to overcome the problem. Right click on workspace provided by Eclipse --> Select "Run As" --> Java Application. This will work definitely. Save this answer.
Workspace log - This is the most common location for the log file, It is stored in your workspace in the meta-data directory. Check out workspace/. metadata/. log .
Create a console and write to it. When a console is created, you give it a name. That way your console output can be kept separate from other plugin's console output. See this article for details.
http://wiki.eclipse.org/FAQ_How_do_I_write_to_the_console_from_a_plug-in%3F
Are you sure you have the console window in eclipse setup to display output? On the menu bar in eclipse, go to Window->Show View->Console. When you run the program, that console window should be where your System.out.print(ln) output is displayed.
If you are running some kind of client-server application, you may actually have multiple consoles. If you see a console, there should be a little arrow icon next to it. Use that to dropdown a list of all the various consoles, and pick the appropriate one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With