On Tue, May 17, 2011 at 12:52 PM, Eduard Moraru <[email protected]>wrote:

> Hi Chamika,
>
> Additionally to starting XWiki from Eclipse (using WTP, auto-deploying
> on tomcat, etc.), you can also remotely debug a running XWiki instace
> (started with 'start_xwiki_debug.sh/bat' instead of
> 'start_xwiki.sh/bad') directly from Eclipse. Works over the Internet as
> well, but you don't care about that right now.
>
> In order to do so, you need to:
> 1. Create a new debug configuration (works on pretty much any project in
> the current workspace) by choosing 'Remote Java Application' from the
> available debug configuration types;
> 2. Specify port 5005, press 'Apply' and then 'Close' to go back to the
> workspace for now;
> 3. Import all the maven modules you want to debug into an Eclipse
> workspace (rest*, oldcore, etc... anything you might need). Having them
> in the workspace also means that they will be available in the classpath
> of the debug process and any breakpoint you set in the opened module
> will be available for debuging;
> 4. Add some breakpoints in one of the imported modules;
> 5. Launch the remote debug configuration you just created;
> 6. Do an action in the browser in the running instance that will trigger
> one of your breakpoints;
> 7. Switch back to Eclipse to find it suspending XWiki's (thread)
> execution to your specified breakpoint.
>
> Advantage:
> Much easier set-up and less buggy Eclipse WTP+Maven tools that can
> sometimes make bad auto-deployments, throw exceptions caused by
> incomplete deploys and generally make your life hard :) Also, you don`t
> need to install tomcat, since XWiki will be using the bundled jetty.
>
> Disadvantage:
> Using this method requires that, for each code modification that you do
> in a maven module in your Eclipse Workbench and wish to test live on
> XWIki, you have to build the modified module and copy/paste the
> resulting jar from the target folder of the maven artefact to the
> WEB-INF/lib folder of the XWiki installation folder. You then have to
> restart the XWiki instance in order to use the modified jar module.
>
> For quick debugging and minor modifications, I recommend this method.
>
> For constant development of XWiki components and working on the latest
> XWiki snapshots,
> http://dev.xwiki.org/xwiki/bin/view/Community/DebugXEWithEclipse proves
> more appropriate for the long run.
>
>  From my POV, for your current needs, I`d recommend remote debugging.
>

+1

This is what I used to do all the time :P

- Asiri


>
> Good luck,
> Eduard
>
> On 05/17/2011 12:07 AM, Chamika Weerasinghe wrote:
> > Hi,
> > I followed all the steps as you were mentioned on Setting up Eclipse for
> > debugging XWiki Enterprise (
> > http://dev.xwiki.org/xwiki/bin/view/Community/DebugXEWithEclipse)
> >
> > I imported jar projects which related to XWiki REST such as
> > xwiki-platform-rest, xwiki-platform-rest-model and
> > xwiki-platform-rest-server and linked them by choosing Deployment
> assembly
> > as projects.
> >
> > According to the README in the xwiki-debug-eclipse I made a XWIKIPLATFORM
> > shared resource targeting xwiki-platform and set it as a linked resource.
> >
> > After finishing I tried to run it on the apache tomcat 7.0 server. But if
> I
> > browse http://localhost:8080/xwiki/ it says requested resource(/xwiki)
> is
> > not unavailable. (Error 404)
> >
> > Is there any method to solve it?
> >
> > Thank you.
> > _______________________________________________
> > devs mailing list
> > [email protected]
> > http://lists.xwiki.org/mailman/listinfo/devs
> >
>
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to