# idea debug gradle web **Repository Path**: yxb_1990/idea-debug-gradle-web ## Basic Information - **Project Name**: idea debug gradle web - **Description**: IntelliJ IDEA社区版 debug gradle web 程序 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2016-01-02 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## IntelliJ IDEA社区版 debug gradle web 程序 为什么使用IDEA社区版开发web程序,很简单,没钱。 - 使用gradle构建一个符合maven标准的web程序 ![](http://static.oschina.net/uploads/space/2016/0102/134018_F4iN_2333893.png) - 添加应用 gretty 插件 ```groovy buildscript { repositories { jcenter() } dependencies { classpath 'org.akhikhl.gretty:gretty:+' } } repositories { jcenter() } apply plugin: 'org.akhikhl.gretty' dependencies { testCompile 'junit:junit:4.11' providedCompile "javax.servlet:javax.servlet-api:3.1.0" providedCompile "javax.servlet.jsp:jsp-api:2.2.1-b03" } gretty { servletContainer = 'jetty9' port = 8081 contextPath = "gretty" managedClassReload = true fastReload = true } ``` - 添加一个remote Run/Debug Configurations 程序, 默认设置不用变,取名字如gretty-web,然后保存。 ![](http://static.oschina.net/uploads/space/2016/0102/133942_6FFR_2333893.jpg) - run appStartDebug 任务, 不要debug appStartDebug, 没用 ![](http://static.oschina.net/uploads/space/2016/0102/134018_FWka_2333893.png) - 使用快捷键Alt+Shift+F9 运行刚刚添加的remote Configurations gretty-web - 关闭的时候使用gretty 的appStop 任务, run appStop