Hybris ECP(Enterprise Commerce Platform)的除錯

i042416發表於2018-02-11

This blog is written to demonstrate how to setup debug environment for Hybris ECP(Enterprise Commerce Platform).

1. start Hybris server via debug option

以debug模式啟動Hybris伺服器

Hybris ECP(Enterprise Commerce Platform)的除錯

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。


Hybris ECP(Enterprise Commerce Platform)的除錯

Choose Debug Configuration from context menu. Use Remote Java Application for debug configuration and connect to port 8000.

選擇remote debug:


Hybris ECP(Enterprise Commerce Platform)的除錯

3. Set breakpoint in file \bin\ext-template\yacceleratorstorefront\web\src\de\hybris\platform\yacceleratorstorefront\filters\cms\CMSSiteFilter.java.

以開啟storefront的UI為例,在上面提到的檔案裡設定斷點。用瀏覽器開啟UI,斷點觸發:

And access the storefront url below and try to open a catalog:

Hybris ECP(Enterprise Commerce Platform)的除錯

Then breakpoint is triggered:

Hybris ECP(Enterprise Commerce Platform)的除錯
Hybris ECP(Enterprise Commerce Platform)的除錯

從偵錯程式裡觀察到的url和最後開啟的產品明細頁面的url一致。

After you press continue in debugger, you could observe the detail page with url inspected in debugger as expected.

要獲取更多Jerry的原創技術文章,請關注公眾號"汪子熙"或者掃描下面二維碼:


Hybris ECP(Enterprise Commerce Platform)的除錯
Hybris ECP(Enterprise Commerce Platform)的除錯

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2151029/,如需轉載,請註明出處,否則將追究法律責任。

相關文章