Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug Eclipse crash on startup?

Tags:

java

eclipse

Sometimes I have to deal with an improperly configured Eclipse installation and when I try to run it only the dialog "Java was started but returned exit code shows up without giving me any useful information to trace the actual reason Java failed to start.

What is the best approach to debug this kind of problem?

like image 710
Luca S. Avatar asked Nov 06 '15 15:11

Luca S.


People also ask

How do I run Eclipse in debug mode?

A Java program can be debugged simply by right clicking on the Java editor class file from Package explorer. Select Debug As → Java Application or use the shortcut Alt + Shift + D, J instead. Either actions mentioned above creates a new Debug Launch Configuration and uses it to start the Java application.

How do I restart Java in debug mode?

You can restart running application by right clicking it in debug window and selecting "Terminate and relaunch".

What to do if debugger is not working in Eclipse?

The solution was to enable it again, start a debug session, the breakpoint is hit and shown in the UI, then disable again the option. There is also another simpler way that will make Eclipse show the debugging highlight at the breakpoint or rather refresh the debugging UI to work as it should.

How do I log Debug in Eclipse?

In Eclipse, click on "Window > Preferences" In the "Preferences" window, select "Collaborator" from left pane. From the right panel after selecting "Collaborator", click on the "Capture Debugging Log" button and close the "Preferences" window.

What is debugging in Eclipse IDE?

Debugging the Eclipse IDE for Java Developers. Debugging is the routine process of locating and removing bugs, errors or abnormalities from programs.

How do I debug a Java program?

A Java program can be debugged simply by right clicking on the Java editor class file from Package explorer. Select Debug As → Java Application or use the shortcut Alt + Shift + D, J instead.

How to pass verbose parameter during the Eclipse launch?

Step 1: Add below VM parameter in eclipse.ini file. By default, eclipse will have javaw.exe, modify it to java.exe -vm C:/KK/jdk1.6.0_32/bin/java.exe Step 2: Pass verbose parameter during the eclipse launch. eclipse -verbose

Why am I getting “source not found” error in Eclipse debugger?

Eclipse debugger will issue an error message "source not found" if the debugger steps into a function without source code, so please try not to step into any code that are not available. wikiHow is a “wiki,” similar to Wikipedia, which means that many of our articles are co-written by multiple authors.


2 Answers

There are several command-line options that can help with troubleshooting. I'd start with -debug -consoleLog and see if that produces useful output.

like image 108
E-Riz Avatar answered Oct 19 '22 14:10

E-Riz


You can run eclipse with the verbose attribute from command line

eclipse -verbose

Read more about debugging eclipse and plugins here http://exploreeclipse.blogspot.nl/2014/01/enable-eclipse-verbose-for-trouble.html?m=1

By default, eclipse launches with javaw.exe process, since it's a window thread so you will not be able to see any verbose messages.

Step 1: Add below VM parameter in eclipse.ini file. By default, eclipse will have javaw.exe, modify it to java.exe -vm C:/KK/jdk1.6.0_32/bin/java.exe

Step 2: Pass verbose parameter during the eclipse launch. eclipse -verbose

like image 34
Bas van Stein Avatar answered Oct 19 '22 12:10

Bas van Stein