- This topic has 1 reply, 2 voices, and was last updated 13 years, 9 months ago by support-swapna.
-
AuthorPosts
-
mannujiMemberHi All,
Can you please help me out how to set Break Points in my code and how to run the struts application in Debug mode.Thanks in Advance …
support-swapnaModeratormannuji,
Debugging a web application in MyEclipse is not much different than debugging a java application.
Here are steps which will help you get started.
There are two ways to set the break point in java code :
1) Double click on the left edge of any line on the java code.
2) Right click on the area instead of double clicking and select Toggle Break Point option.
Steps to run in Debug mode :
1) Right click on the project. Select Debug As > MyEclipse Server Configuration.
2) Choose the server to run the application.
3) Open the browser to the JSP so we execute our page, which calls the java code, which hits our breakpoint
4) Confirm the switch to the debug perspective.
5) Click the “step” button to step execution to the next line
6) There should be variables visible in the Variables view
7) Remove the break point.
8) Hit Continue to let it finish
9) Close the Debug perspectiveI am also providing the steps for JSP debugging in addition to the class debugging steps :
1. Set a breakpoint on the scriplet in the JSP that sets the page’s basepath in the <head> tag
2. Deploy the project to MyEclipse Tomcat
3. Start MyEclipse Tomcat
4. Open the browser to http://localhost:8080/SimpleJSP (or whatever the real path is to run that JSP)
5. Confirm the “Switch to the Debug perspective?” question
6. The Thread status of SUSPENDED should be in the correct location in the tree
7. There should be variables visible in the Variables view
8. Remove the Breakpoint
9. Press Continue to let it finish
10. Close Debug perspectiveHope this helps.
-
AuthorPosts