gwt-gradle-plugin icon indicating copy to clipboard operation
gwt-gradle-plugin copied to clipboard

DevMode remote debug port should be enabled by default

Open hrstoyanov opened this issue 12 years ago • 3 comments

Right now one needs to define the debug port as a (global?) Gradle system property in order for the IDE to attach to it and debug a GWT app. As it is hard to imagine a situation where DevMode would run without debugging port, I suggest that this is the how it starts by default. The default debug port could be something like 5500 (or whatever), but can also be configured like this: gwt { gwtVersion='2.5.1' gwtDevDebugPort=5601 modules '<YOUR-GWT-MODULE>’ }

hrstoyanov avatar Nov 03 '13 02:11 hrstoyanov

As far as I know, this blocking behavior is the intended behavior when running Gradle tasks in debug mode. I do not know if this can globally be changed in Gradle.

I personally do not always start dev mode with debugging turned on as this kills your perm gen after several reloads. I do not know if this also occurs if debugging is turned on but no debugger is actually attached. This would need to be checked.

If you need that behavior, you can easily implement it by using:

gwtDev {
    jvmArgs '-agentlib:transport=dt_socket,server=y,suspend=n,address=8000'
 }

steffenschaefer avatar Nov 20 '13 17:11 steffenschaefer

The blocking happens only if you use 'suspend=y' with the debug command lines options, hardly the best choice. I will have to try your suggestion of setting the jvmArgs, but it would only work if you execute the gwtDev as a separate process (which I assume you do). Thanks.

hrstoyanov avatar Dec 04 '13 08:12 hrstoyanov

The tasks compileGwt/draftCompileGwt, gwtDev, gwtSuperDev are all executed as seperate process. I don't know why Gradle doesn't provide a functionality to customize the debugging stuff. As far as I know, there's only the debug flag :(

steffenschaefer avatar Dec 04 '13 20:12 steffenschaefer