This blog is written to demonstrate how to setup debug environment for Hybris ECP(Enterprise Commerce Platform).java
1. start Hybris server via debug optionweb
以debug模式啓動Hybris服務器瀏覽器
2. import folder <hybris installation folder>hybris\bin into Eclipse. Right click on the extension you want to debug. In my example it is yacceleratorstorefront.服務器
把bin文件夾整個導入Eclipse。 url
Choose Debug Configuration from context menu. Use Remote Java Application for debug configuration and connect to port 8000.debug
選擇remote debug: 調試
3. Set breakpoint in file \bin\ext-template\yacceleratorstorefront\web\src\de\hybris\platform\yacceleratorstorefront\filters\cms\CMSSiteFilter.java.orm
以打開storefront的UI爲例,在上面提到的文件裏設置斷點。用瀏覽器打開UI,斷點觸發:server
And access the storefront url below and try to open a catalog:blog
Then breakpoint is triggered:
從調試器裏觀察到的url和最後打開的產品明細頁面的url一致。
After you press continue in debugger, you could observe the detail page with url inspected in debugger as expected.
要獲取更多Jerry的原創技術文章,請關注公衆號"汪子熙"或者掃描下面二維碼: