I can't find the terminal where the message is supposed to show. How is it called?
I'm guessing it should be in View->Tool Windows but nothing from there seems to work. It's a Maven project and all I can see is GlassFish log.
System.out and System.err output is written to either the Run or the Debug tool window depending on whether you launch the run/debug configuration as Run or Debug. See https://www.jetbrains.com/idea/help/running-and-debugging.html and https://www.jetbrains.com/idea/help/run-tool-window.html for more information (Same information is in the Help guide of the IntelliJ IDEA Ultimate version).
In Java EE applications with Tomcat container, if you want to see the result of prints like System.out.println(), first go to Run > Edit Configurations and select your tomcat server in the left menu, then open Logs tab and check 'Show console when a message is printed to standard output stream'
Click on the below image to figure out.
For running mode:
View -> Tool Windows -> Run
For debugging mode:
View -> Tool Windows -> Debug
You must be on one of the above two states in order to accomplish this action.
Related
As you know when we building applications we get Errors/Exceptions such as NullPointerException etc. on IDE Console (I'm using IntelliJ IDEA).
I want to display those errors simultaneously in my Mac Terminal for larger view so I don't have to horizontally scroll IDE Console every time when I get big errors.
I don't want to run my applications from Terminal with commands (java class...)
I want to run from my IDE and all texts which is going down(errors,exceptions infos.) will reflect to Terminal.
So is there a any log file that i can look into? How can I achieve this?
In the Logs tab of an IntelliJ IDEA run configuration, there is an option "Save console output to a file". You can use that to save the output of your application to a file and to view it in the terminal.
Hi iam new to eclipse plugin development , iam trying to create a simple plugin having a menu . I have installed it in the same eclipse workbench in which it was developed . However if i click on it i dont see the output in the console view . Howveevr if i run the project as a seperate eclipse app in a seperate workbench it works but shows the output in original workbench in which it was developed .
Can anybody help me out how to view the plugin output in the same workbench , irrespective of whether it is a new workbench or the same workbench in which it was developed
Any help is highly appreciated .
Thanks
I think what you want is to start the workbench as eclipsec. This eclipse launcher opens a terminal window next to the workbench in which console output (i.e. things written to System.err / System.out) appears.
There is no simple way to put output in the console in both cases.
When you run in a separate workbench the console is just showing the output from System.out and System.err. Your plugin is running as part of a separate Eclipse in a new JVM, the Eclipse console is showing everything that is output by that JVM.
When you are running in the same workbench you would have to use the console APIs in the org.eclipse.ui.console package and extension points such as org.eclipse.ui.console.consoleFactories to create a console and write to it.
I seem to be able to run Java programs and get output in Eclipse when I use StdOut.println(...). I have a program that reads from StdIn and should print to StdOut. I know the program works because I have submitted it to a class autograder and got a perfect score on it, but I must be doing it wrong in Eclipse. Please explain how to set this up. I thought I understood how to use the "Run Configuration", but obviously I don't.
Follow these steps.
Right click on the project that you want to run. (In Eclipse)
From the appeared menu, Select Run As
Then finally select Java Application
And make sure, Your console is visible in your Eclipse IDE,
To Enable it,
Goto Windows tab in Eclipse IDE
Then Select Show View
Finally select Console
I am doing remote debugging of a Java application and using the debug view of Eclipse. The basic debugging process is working fine and I can see the method stack traces in debug view at the relevant breakpoints. However, I am not seeing the corresponding source code in the tab below and it is saying:
Source not found
The source files are already in my Eclipse project and I can see them in the Java view. I have edited the source look up paths and added the *.java files to it. But even then I am not seeing the source code in the debug view where the execution halts. Any clues on this would be appreciated.
For the Run/Debug configuration that you have been using to Remote Debug, have you followed these steps :
“Run -> Debug configurations…”
Choose the remote config from the tree on the left
Click on the “Source” tab
Click on the “Add…” button
Follow the wizard (add the Project containing the source which is being debugged).
If so, can you post a snapshot of the Run Configuration ?
What I have usually done with a Remote Debug run configuration is Add Source as Java Projects to the Source tab on the Run/Debug configuration. Thus to add a project called so, I would proceed as follows :
And when choosing the project, select the two checkboxes :
To end up with this finally :
I have done the below steps and it worked for me:
Run > Run Configurations
Java Application > Click on Source Tab
Include the project by selecting the option "File System Directory"
Debugging started showing the source code.
You are probably using JRebel which is automatically recompiling and reloading classes. Unfortunately Eclipse Debugger doesn't work with class realoaded in this way. In order to make sure that Eclipse will work fine with the class after changes you have to restart your web application container.
usually when I debug java by pressing on the bug icon, it starts debugging right away and goes to the debug perspective...
but now everytime I click on the bug icon, it always opens up the debug configuration window rather than actually debugging....
any idea as to how to make it debug right away once again?
This usually happens if you have configured Eclipse to "Always launch the previously launched application" (Preferences>Run/Debug>Launching) but Eclipse can't find a previously launched application. Does this happen again if you configured the debug configuration once, debugged successfully with this configuration and then try to rerun it?
Or you could change this setting so Eclipse always tries to run/debug the currently opend file, then it will behave like Ed described it.
If it has a saved configuration for the currently active file in the editor, it will automatically use it. Otherwise, it will want you to tell it what you want. I'd suggest getting in the habit of using saved configurations (down-arrow on the debug button) that you've set up.
You could install 'Eclipse Runner' via marketplace. It's a nice addition of run/debug feature.
I faced the same problem. I defined the debug configuration and run my Junit but my eclipse was crashing again and again.
I restarted my eclipse and my debugAs menu is back to two options [Debug on server or debug as Junit].
Hope it might help.