BTW - At no point to I get the 

"step into" or "step over" choices. Shouldn't they be available at some
point after
I attach the process?

Thanks,

Heather

Jason Rumney wrote:
> 
> >  > I am running a servlet application under tomcat (servlet engine) and
> >  > apache with mod_jk.
> >  >
> >  > I modified the tomcat startup file to contain the debug stuff:
> >  >
> >  > it starts up:
> >  >
> >  > java -classic -Xrunjdwp:transport=dt_socket,address=NNNN,server=y,
> >  > suspend=n -Xdebug -Dtomcat.home= $MAIN
> 
> Presumably you already use a number in place of NNNN above, or it
> would fail on startup as well.
> 
> >  > problem #1
> >  > tomcat starts ok, but when I shut it down, it complains:
> >  >
> >  > "err:: Address already in use
> >  > Transport dt_socket failed to initialize, rc = -1"
> 
> I would recommend setting the debug options in TOMCAT_OPTS in
> startup.sh, not in tomcat.sh. Otherwise the shutdown command tries to
> use the same port for debugging, which results in the above error.
> 
> The other idea to use ant would also work, but seems like an
> unnecessary complication to me.
> 
> >  > the jdebug documentation tells me what to do if I have solaris +
> >  > jdk1.3, or linux + jdk1.2.2, but it doesn't specifically say what
> >  > to do with linux + jdk1.3. So I follow the instructions for
> >  > solaris + jdk1.3
> 
> I think that is the right thing to do.
> 
> >  > Execute JDEbug->Processes->Attach Process->Local Host
> >  > I then enter my socket number (which may or  may not be good)
> 
> This is the NNNN number in the debug options, yes? Not one of the
> other sockets that Tomcat is configured to use.
> 
> >  > Then I start my app. in the browser.
> >  >
> >  > Then I come back to jdee and nothing happens. I try to do:
> 
> Did you set any breakpoints? If not, I wouldn't expect anything
> visible to happen. I have found that you need to set the breakpoints
> after attaching the debugger to Tomcat, or they won't work.
> 
> >  > Display - local variable, and I get an error
> 
> You can only display local variables when you are stepping through
> (once the breakpoint is hit).
> 
> --
> Jason Rumney

-- 
http://www.mit.edu/~hmbuch/

Heather Marie Buch  [EMAIL PROTECTED]

Reply via email to