STS(Spring Tool SUite) Output console view disappears/closes automatically - eclipse

I am using STS(Spring Tool Suite) 3.6.4 version. For the last few days I am facing new kind of issue. Whenever I try to open console(Using Window > Show View > Console) console view opens for fraction of seconds and closes/disappears automatically. Same thing happens when error/info printed to console. It is visible for the fraction of seconds and closes automatically.
I am trying to see Tc server console. Currently for me there is no way to see the console view. Can any one have idea why it happens/ any solution.

Click mouse right button on the workspace, and click Reset

You can reset the perspective to get the console.

It worked with new workspace. May be the old workspace was corrupted.

For me, any console that appeared when running a Java application would immediately disappear. Same git-repo/workspace, different computers. What fixed that for me was quitting Eclipse, deleting the .metadata and .settings folders, relaunching, and re-importing my projects. Only the workspace and my custom dictionaries survived.

Some times because of unexpected short cuts Eclipse or/STS or due to some other issue
Allocate Console gets disabled. So we need to enable it
Run => Run Configurations > common Tab
Debug => Debug Configurations > common Tab
enter image description here

Related

How Can I Always Reset My Workplace Settings for Every Time I Quit VS Code?

What I want is to have all of my workplace preferences reset every time I quit VS Code. Right now, if I quit the application and opened the same folder I previously closed, VS Code still retains all pointer positions and all opened files. This maybe good for a lot of people, but for me, I just feel overwhelmed.
What I have tried:
I tried to locate .vscode folder but it is non-existent in my project folder.
"Clear Command History" doesn't work.
"Clear Editor History" doesn't work.
Following this link ---> https://github.com/Microsoft/vscode/issues/42948 and deleting /home//.config/Code/Local Storage doesn't work.
Following this link ---> https://github.com/Microsoft/vscode/issues/42948 and running window.localStorage.clear() in Electron development console returns undefined.
I am using Ubuntu 18.04.
In the settings menu you can search for window.restoreWindows and change that to none. You can also change workbench.editor.restoreViewState to false which might also help.

Is it possible to stop output to console within eclipse?

within eclipse running same result will be output console and testng plugin view.most of time,I will switch back to testng plugin view to check result.so is it possible to stop to output running result to eclipse console view?Or let user to choose which view be current view(or called default result checking view).
Not sure if I understand the question correctly, but you can disable automatic showing of the console view by unchecking icons and .
Alternatively you can discard all your output just by redirecting it to a /dev/null (if you are on UNIX based system) in Run Configurations > TestNG > your run config > Common.
However the easiest way is to move the test view to a side panel rather than the same area where the console is.

Whats the shortcut to Debug in PyDev using Eclipse

The shortcut key is F11 to start debugging. But issue is that I have to be on that file and then hit F11 to start debugging.
Eg.
my file to launch the application is "launch.py" and "example.py".
example.py is open in the editor whereas launch.py is not.
Now, if I hit F11 it will try to launch the application using "example.py" and terminates due to error (as expected).
So then I have to open the "launch.py" in the editor and then hit F11 to start debugging the application.
Is there any neater way to configure the debugging, so that it starts the application in single hit/key?
Edit: example.py is some other file (some module). It does not launch the application.
As this PyDev Eclipse Tutorial suggests:
After the first run, if you type Ctrl+F11, the last file ran is re-run. Or, if you type just F11, a debug session is started with your last run. Let's test this...
Note: This behavior changed in Eclipse 3.3 -- but it's generally recommended to restore it in the preferences at: window > preferences > Run/Debug > Launching and set the Launch Operation to Always launch the previously launched application.
This tutorial will always consider this as the default option.
So, did you have this option selected?
If you have launch at least once launch.py, then you can re-launch it easily.
Although this isn't strictly an answer to what was asked initially, it might help someone looking here that had the same problem as me...
I'm a Java developer mainly, so have the Java view open almost all the time. However, sometimes I want to run some python file to test something (or just create a quick python script, and run it)...
In the Java editor, if the current class has a main(String[] args) method, I run it with (and popup the dialog to ask me what exactly I'd like to run in the middle)
alt+shift+x, j
Unfortunately, that doesn't work in the Python view, and I've not found a similar solution - it just asks me if I'd like to run it as a Java app... however, as the VonC says, you can run the last run thing (provided you've set the preferences accordingly) with
ctrl+f11
and this seems work well with python run configurations too.
But... What if the last thing I ran was a Java program, but I now want to run the active .py file? Previously, to run the .py file, I'd have to go digging through the buttons on the toolbar with the mouse, and I tend to prefer keyboard shortcuts...
Solution! So, finally I come to the actual useful bit of this answer - I just discovered by accident (typing Ivan's suggested shortcut, but missing!), it appears that
f9
will run the currently active python file.
Hope that helps someone get just that little bit faster...
I use CTRL+SHIFT+F9 to relaunch the previous debug configuration in Pydev.

Strange behaviour of created *.exe

Has anyone any idea why the resulting exe from a build comes with a console?
I've built an EXE and it shows up with the window it should (the right one), and a console window (the left one - obviously).
alt text http://img216.imageshack.us/img216/570/strangep.jpg
This behaviour is the same for the debug - exe and the release - exe.
When I start it from Eclipse the console window does not show up.
(Eclipse Galileo / MinGW / C)
Find the linker settings, and add the -mwindows switch.
you might look into this here surely answers why Eclipse is not opening your console window
There seems to be no way to get a java.io.Console object when running an application through Eclipse. A command-line console window is not opened with the application, as it is run as a background process (background to Eclipse?). Currently, there is no Eclipse plugin to handle this issue, mainly due to the fact that java.io.Console is a final class.
All you can really do is test the returned Console object for null and proceed from there.
as far as your console window popping is concerned, you might be using System.console in the application
Hope this Helps

Eclipse + pydev - Missing Console-view toolbar in minimized mode

I'm using Eclipse + pydev plugin as the development environment. In fact my application needs a big console area and I usually resize the console and minimize it, so that whenever I run the application, it automatically shows up.
But when I minimize the console view or detach it or mark it as Fast View, the toolbar for controlling the running process and locking the scroll disappears.
Can I have both minimize functionality and Process control toolbar ?
Eclipse : Galileo Build id: 20090619-0625
Pydev : 1.5.3
Right now, in Eclipse/PyDev, you can't have the toolbar when it's minimized (you have to open it to access it), but most of what you need should be available through shortcuts (some may need focus on a PyDev editor):
Terminate current process: Ctrl+F2
Terminate all processes: Ctrl+Alt+F9
Terminate / relaunch last launched process: Ctrl+Shift+F9
To launch the currently open editor: F9
To relaunch the last launch (provided you followed the steps at: http://pydev.org/manual_101_run.html): Ctrl+F11
To debug the last launch: F11
To show the console view: Alt+Shift+Q, C
And if you want, you should be able to configure those in the keybindings (Ctrl+Shift+L twice to open the preferences page to do so).
I used eclipse with pydev and it drove me nuts. I use Netbeans 6.8 right now which came bundled with its own python plugin that is a lot better. Especially when it comes to debugging.