How to debug grails command

别说谁变了你拦得住时间么 提交于 2019-12-06 21:52:23

问题


When I run dbm-generate-changelog exception is thrown. I would like to debug this script but I can't figure how to do it. I tried to put breakpoint to the script file _DatabaseMigrationCommon.groovy and then in eclipse created new "debug configuraion" command. When I run this none of breakpoints suspend the execution. I also tried with --debug argument.

setup:
Grails: 2.3.3
GGTS: 3.4
Eclipse: 4.3

回答1:


Do the following:

  1. launch grails with the -debug option

    grails -debug run-app
    
  2. create Remote Java Application debug configuration in Eclipse and set port to 5005

  3. enjoy breakpoints and step-by-step debugging




回答2:


I'm using GGTS tool. Open it. Go to "Debug As" (bug icon).
Select "grails" in the list and select "new configuration" (blank paper icon).
In the next window, select your grail project in the "project field".
Write "run-app" in the grails commmand field. click "Apply" and click "Debug".

That is.




回答3:


Try to use dbm-generate-changelog -verbose -stacktrace, it could help you to find cause of fault.



来源:https://stackoverflow.com/questions/20181006/how-to-debug-grails-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!