On Sun, 2006-10-29 at 22:18 -0800, jiangshachina wrote:
> Hi Max,
> > I suspect that this is what was really happening in your previous setup
> > anyway, and that the Eclipse WTP plugin just took care of the details
> > for you.
> Really, I always don't care the detail WTP plugin does.
> But in my memory, it's needn't set any extra statements into
> run.sh/run.bat(JBoss) for (local) debugging, when I use plugins(Eclipse WTP,
> MyEclipse) .
> 
My point was just that WTP almost certainly runs JBoss with debugging
on, and sets up the Eclipse debug session for you, without requiring you
to be aware of the details.

There is more than one way to turn debugging on in JBoss, without
editing run.bat. On Windows, setting debug options in the JAVA_OPTS
environment variable before calling run.bat would turn debugging on. Or
you could ignore run.bat completely and use your own script to run
JBoss, setting whatever options you want. Maybe WTP even starts JBoss in
the same process as Eclipse (doubtful, but possible), I don't know. 

My team doesn't actually edit JBoss's run.bat to turn debugging on. We
use a heavily customized version of jboss-maven-plugin, which has it's
own run scripts. We modified the script to optionally set debug options
in JAVA_OPTS, before the script calls the standard JBoss run.bat script.

-Max

> a cup of Java, cheers!
> Sha Jiang
> 
> 
> Max Cooper wrote:
> > 
> > To make the JBoss JVM listen for debugger, you set some params in the 
> > run.bat script (or run.sh/run.conf on *nix). There should be a section 
> > already in the run script to turn debugging on -- look for "JPDA 
> > options". You just uncomment the lines to enable remote debugging.
> > 
> > Note that by default it sets "suspend=y", which will cause the JVM to 
> > wait until you connect the debugger before it does anything (like start 
> > the server). This is useful if you need to debug things at startup, but 
> > I normally set "suspend=n", so the server will start normally, and I can 
> > just connect and disconnect the debugger whenever I want. You probably 
> > want to change this to "suspend=n".
> > 
> > Note what the port number is (default is 8787) -- you will need to tell 
> > Eclipse the port number when you setup the debug session.
> > 
> > No other files are affected.
> > 
> > Debugging (JPDA) is a standard feature of Java, and has nothing to do 
> > with Maven.
> > 
> > In Eclipse, you setup a debug session, and tell eclipse which server and 
> > port number the JBoss JVM is listening to (e.g. localhost:8787).
> > 
> > I suspect that this is what was really happening in your previous setup 
> > anyway, and that the Eclipse WTP plugin just took care of the details 
> > for you.
> > 
> > -Max
> > 
> > jiangshachina wrote:
> >> Hi Max,
> >> I think remote debug local server(I'm using JBoss) would be OK.
> >> But it there alternative approach for local debugging?
> >> 
> >> If use remote debugging, shall I re-config some parameters in web.xml or
> >> other conf files?
> >> Thanks!
> >> 
> >> a cup of Java, cheers!
> >> Sha Jiang
> >> 
> >> 
> >> Max Cooper wrote:
> >>> It sounds like your primary requirement is "how can I debug my webapp".
> >>>
> >>> My project uses Maven to build and deploy a webapp to a server running
> >>> on the local machine, and then we connect the Eclipse debugger to the
> >>> local server via the standard Java "remote" debugging interface.
> >>>
> >>> -Max
> >>>
> >>> On Sun, 2006-10-29 at 00:28 -0700, jiangshachina wrote:
> >>>> Hello,
> >>>> Currently, I use an Eclipse plugin(WTP) to create a Web application.
> >>>> And I use the plugin to export(deploy) the Web application to an
> >>>> Web/Application Server(JBoss)'s deploy directory.
> >>>> Then I can debug the application when the server is running.
> >>>>
> >>>> The function is provided by the plugin.
> >>>> If the project isn't created by the plugin, the plugin cannot deploy
> >>>> the
> >>>> app(may since directory layout).
> >>>> And I cannot debug the app with server(it's a serious problem).
> >>>>
> >>>> Now I want to use Maven and it's standard directory structure.
> >>>> But how Maven to fulfil the requirement?
> >>>>
> >>>> a cup of Java, cheers!
> >>>> Sha Jiang
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >>> For additional commands, e-mail: [EMAIL PROTECTED]
> >>>
> >>>
> >>>
> >> 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to