Posts Tagged ‘eclipse’

Viewing complete strings while debugging in Eclipse

February 14, 2017

While debugging Java code, Strings in the views “Variables” and “Expressions” show up only till a certain length, after which Eclipse shows “…”. Even after working with eclipse for 10 years it was a new info for me. There is a way to show the complete string.

In the Variables view you can right click on Details pane (the section where the string content is displayed) and select “Max Length…” popup menu. The same length applies to expression inspector popup and few other places. In the max length give 0 and you will see the whole values in the value box.


Thats it guys, enjoy coding.

PermGen space Exception in Eclipse

April 25, 2014

Well a quick post. Sometimes Eclipse really go nuts and starts throwing this exception for each and every action :

Unhandled event loop exception
PermGen space

You can solve this by editing the eclipse.ini file which is residing in the same directory as the eclipse.exe. Towards the end of the file add this line :


You can give whatever space you like such as 256M or 512M. After this restart your eclipse and forget about the PermGen Space Exception. (I Hope So. :P)

For those who are more interested in permGen, The permanent generation (or permgen) was used for class definitions and associated metadata prior to Java 8. Permanent generation was not part of the heap. The permanent generation was removed from Java 8. Originally there was no permanent generation, and objects and classes were stored together in the same area. But as class unloading occurs much more rarely than objects are collected, moving class structures to a specific area allowed significant performance improvements. In short, PermGen is used by the JVM to hold loaded classes.

For More information on Eclipse permGen space Exception read this : More

Happy Coding Guys…

Debug using Apache Tomcat and Eclipse

May 16, 2011

It is always useful to debug the code in a line by line fashion to track where the code went wrong. Since I am using Apache Tomcat server for development purpose this article deals with enabling debugging on Apache Tomcat with Eclipe IDE.

First we need to set up the Tomcat server to enable debugging. Usually the debugging port used for tomcat is 8000, but you can set to any free port.

1. Open the startup.bat file from Tomcat directory (<Tomcat Installation Directory>/bin/)

2. After the script initializes the command line arguements, most probably towards end of file, add these two lines :

set JPDA_TRANSPORT=dt_socket

3. Change the line where it calls the EXECUTABLES to :

call “%EXECUTABLE%” jpda start %CMD_LINE_ARGS% (add jdpa start).

Save the file and start the tomcat. Now the first line of the tomcat startup console will show :

Listening for transport dt_socket at address: 8000

At this point your Tomcat server is ready to be run in debug mode. Now do the following steps at Eclipse IDE for debugging in Eclipse.

1. Open one class where you want to put breakpoint and add one breakpoint. (This can be done by clicking on the left margin on the corresponding line.

2. From Run menu, select Debug Configurations

3. From the left side, right click on Remote Java Application and click new

4. Fill out the form appearing. Only thing to take care is the server name should be localhost and port number 8000. This can be changed if you are debugging on a remote server.

5. Click on debug and now the eclipse is running in debug mode.

Now you can run the application and whenever the thread reaches the line, where you have put the breakpoint, it will pause execution. Then you can see the current values of the variables, you can step by step execute the line and so on.

That’s it guys. Happy Coding 🙂

Linking an external folder to Eclipse / Flex Builder Project

December 6, 2010

At times, there may be a need to link some external folder to the source code of our project in Eclipse or Flex Builder project. One common need is to link the output of our java project in Eclipse to the WEB-INF folder of our web server.  Do the following steps for this.

1. Right click on the project -> new -> Folder.

2. In the dialog box shown, click on the Advanced button, if the advanced section is not expanded. This will expand the advanced section in the dialog box.

3.Now check the checkbox with label : “Link to folder in the file system”. This will enable the text box for entering the path and the Browse and Variables button.

4.Now either enter the path to the folder to which you need to link in the text box or select the folder using the “Browse” button.

5. Click Finish.

BINGO!! This will show the new folder in the folder list under the project. The folder will be having a special icon, denoting that this is a external linked folder. This folder can then be used as source folder or output folder using the Configure Build Path options.

Happy Coding Guyz… Cheers. 🙂

%d bloggers like this: