Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse write to console

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.

like image 995
drbob Avatar asked Dec 03 '09 00:12

drbob


People also ask

How do I save my console output in Eclipse?

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.

Why Eclipse is not giving output in console?

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.

Where are Eclipse console logs stored?

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 .


3 Answers

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

like image 176
aerobiotic Avatar answered Sep 29 '22 12:09

aerobiotic


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.

like image 34
dcp Avatar answered Sep 29 '22 13:09

dcp


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.

like image 42
Greg Charles Avatar answered Sep 29 '22 13:09

Greg Charles