• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Debugging Web Project in Eclipse

 
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everyone,

I am using eclipse in developing web application, but I am having a hard time debugging my web project. Most of the time I use a lot of System.out.println to see my program flow.

Could someone help me find a link about configuring web project(Struts) debugging in eclipse so I can try to Step In, Step Out over my action classes call and put my project in Debug Mode.

I have found a link on using NetBeans and have tried its Debugging Mode. But I am using eclipse and I wanted to know If I can configure its debugging option. Thanks for the Help..
 
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are lots of debug configuration options in Eclipse. What specifically are you attempting to debug? JSPs? Use the Debug Perspective. There are also a number of Views available for this Perspective. The most commonly used are Variables and Breakpoints and each have their own options. Look also at Windows >> Preferences >> Run/Debug. Also, try searching for "debug" in Help >> Help Contents.
[ September 19, 2007: Message edited by: Jay Damon ]
 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Jay,

I do would like to debug both my JSP and my action classes. But I dont know much how to configure the debug perspective in eclipse.

I have tried netbeans and was able to set breakpoint that allows me to step into/over each of my JSP and Servlet class.

Just would like to find a resource on how to do the same in Eclipse

Thanks in advance
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which servlet container are you using? Tomcat, or something else?

Eclipse supports a number of different servlet containers, including Tomcat. If you go to Window / Preferences, and then to Server / Installed Runtimes, you can tell Eclipse where your servlet container is. If your project is a Java web project, you can then deploy your application to the servlet container from Eclipse, and start the server in debugging mode from Eclipse. You can put breakpoints in the code of your JSPs, servlets or other classes in your webapp and debug it while it's running in the servlet container.
 
Jay Damon
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What specifically do you want to configure in the Debug perspective? When you launch a Debug Perspective, it is essentially ready to go. As Jesper says, all you need to do is start your server in debug mode. The application will stop at any breakpoints you have set and, in the Debug VIEW of the Debug perspective, you will have options to Step Into, Step Over, Step Return, etc.

Your best bet for a debugging resource is to search for "debug" in Help >> Help Contents of Eclipse.
 
Mark Reyes
Ranch Hand
Posts: 426
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I tried looking for the Server Perspective in Window->Preferences->Server, but no entry for Server can be found. Also I tried Window->Show View->Other->Server but cant find it also.

I am using MyEclipse 3.2, am I missing some plugin here or forgot to make some coonfiguration? Also I used tomcat as my web server. I am quite a newbie in using Eclipse IDE.

Thanks for the help..
 
Jay Damon
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Servers" is a View not a Perspective. From a Debug (or any other) perspective, select Window >> Show View >> Others >> Server >> Servers. Once a Servers view is open, right-click on the view body and select New >> Server. Follow the prompts to create a server for the appropriate version of Apache Tomcat.
 
Grow your own food... or this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic