0

I am trying to start a grails project in debug mode, it doesn't start The grails debug config looks like

grails> -Dserver.port=8091 run-app

i have also tried

grails> -Dserver.port=8091 --debug run-app

But no success. Please help

2 Answers2

0

Instead of --debug use --debug-fork to run your app in debug mode:

grails --debug-fork -Dserver.port=8091 run-app
Sandeep Poonia
  • 2,158
  • 3
  • 16
  • 29
0

I prefer to use remote debugging.

Add this to your BuildConfig.groovy file:

grails.project.fork = [ // configure settings for the run-app JVM run : [ maxMemory: 768, minMemory: 64, debug: true, maxPerm: 256, forkReserve: false ] ]

Next configure remote debugging in yor IDE with host: localhost and port: 5005

After that run application using run-app command and when it tells in console:

Listening for transport dt_socket at address: 5005

Run your configured remote debugger. When application starts you will be able to debug your code.

Sergei Dubinin
  • 306
  • 3
  • 15