如何使用gradle调试spring应用程序 [英] how to debug spring application with gradle

查看:115
本文介绍了如何使用gradle调试spring应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发spring app,需要逐步执行控制器方法以了解其工作方式. 我正在eclipse中工作,并使用gradle bootRun命令构建我的应用程序.

I am working on spring app and need to step through a controller method to see how it works. I am working in eclipse and building my app with gradle bootRun command.

如何在调试模式下运行它?

How to run it in debug mode?

我尝试了gradle bootRun --debug,但这只是调试日志,而不是调试模式

i tried gradle bootRun --debug but it's just debug log, not debug mode

我尝试了gradle help --task bootRun-这为我提供了有关任务的信息 在那里我看到了--debug-jvm选项,但是当我运行时 gradle bootRun --debug-jvm应用程序无法启动

i tried gradle help --task bootRun -- this gives me info about task there i saw --debug-jvm option but when i run gradle bootRun --debug-jvm application doesn't start

推荐答案

运行gradle bootRun --debug-jvm后,应用程序将暂停,直到将调试器连接到正在侦听的端口(端口5005)上.

After you run gradle bootRun --debug-jvm the application is suspended until you connect your debugger to the port it is listening on (port 5005).

这篇关于如何使用gradle调试spring应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆