• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Trace with Eclipse

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi all

anybody can help me how to trace when running the project in eclipse.
I run a project of using Tomcat4.1,xml mapping,servlet,jsp and javascript.I can run that but I want to trace line by line like in VB using F8.
And I want to see the variable value in project.How can I do that?

Thanks
 
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sounds like you want to use remote debugging.

You'll need to start the project JVM with debug options like these: -Xrunjdwp:transport=dt_socket,address=7500

Then create a new remote debugging task in Eclipse (Run->Debug...->click on 'Remote Java Application'->click New) and set it up from there.

Then start your app and launch the debugging task.

That's a pretty quick summary - the doco that comes with Eclipse is pretty good on remote debugging so if you get stuck, try there.


-Tim
 
SYong may
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Tim

I do your suggestion.But how do I Start remote VM and port?Please
tell me detail step to do.

Just now I get this message.

failed to debug to remote VM Connection refused.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Or you could "simply" install and configure the Sysdeo Tomcat plugin and let it do the rest for you...
 
Tim West
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The following work for me:

'Debug' instance - connection type 'Standard (Socket Attach)', host localhost, port 8000.

JVM startup parameter (which happens to be passed in via an Ant task):

"-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"

Now, start the server like normal. When you want to debug, run the debug task and it will try to connect to the JVM instance. The important thing is that you start the server like normal before you try to debug - running the debug task won't start the server for you.

I imagine that if you had some sort of firewall program it might block the port...I'd guess in this case you can set it to allow connections from localhost...

Hope that helps,


-Tim

(Edit: make the port numbers match)
[ August 10, 2004: Message edited by: Tim West ]
 
SYong may
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim

I can't do again.I run the jvm as you write and start the tomcat.
And run->debug debug the project.

But the same error .

Fail to connect to remote vm.Connection refused.
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to set the aplication server to accept dedug requests (see above details describe this) and you need to tell eclipse where to fire the debug requests. Do this by run>debug. click on Remote java appliaction and then fill in the details.

...and Bob should then be your uncle.

see this thread as well:
https://coderanch.com/t/94916/Testing/Debug-ee-application
[ August 19, 2004: Message edited by: Patrick Cogan ]
 
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic