Hi, @EricPyZhou! Welcome to XWiki!
Before jumping head first, I recommend you read the
Getting Started section on the XWiki GSoC page and specially the guide document it links too. It should help you better understand what XWiki is, how to develop extensions for it, etc.
If you still have unclarities after going through that, don’t hesitate to ask.
In your case, you do seem to have lightly gone through a bit of the documentation, so you might also be interested in https://www.xwiki.org/xwiki/bin/view/Documentation/DevGuide/Tutorials/WritingComponents/#HDeployingtheComponent (the rest of the document is very important too, when working with components) and https://dev.xwiki.org/xwiki/bin/view/Community/Debugging as well.
I see the Eclipse debugging doc is currently a bit too advanced for regular needs and you don’t need to go through all that. Just handle it like a standard java web application:
- Download XWiki locally (the Standard Flavor Preinstalled version is good for this type of testing/quick setup)
- Deploy your jar (if you do it manually)
- Start it in debug mode (
- (optional) Install your extension with Extension Manager, in Administration (if you do it the clean way, rather than the manual way)
- Open Eclipse (or your java IDE) and make sure you have imported the maven project (code) of your extension
- Set your breakpoints and start a remote java debugging connection to localhost port 5005
- Open your wiki in the browser (localhost:8080) and perform an action that is supposed to trigger your code and hit the breakpoint(s) that you’ve set.
Your IDE should get triggered once and execution of the thread should stop to your set breakpoint from where you can debug on.