Skip to content
Attila Kelemen edited this page Jan 6, 2016 · 1 revision

You can define settings affecting the debugging of Gradle projects here.

Debug mode

Defines if you want NetBeans attaching to the debugee or if debuggee is supposed to attach to NetBeans:

  • Debugger listens for connections: When the debugging command is started NetBeans will start listening on a port and the debuggee is expected to connect to NetBeans on that port (JPDA). This option is usually better for most projects (it is not the default value only for compatibility reasons). If for some reason the default init script of NetBeans cannot configure your task automatically, you can check for the presence of the debuggerJpdaPort project property and if there is one: connect to it via JPDA. You might also want to check the presence of the debuggedTaskName project property which specifies which Gradle task is expected to be debugged. One additional benefit of this mode is that when you detach the debugger, the debugee is killed immediately.
  • Debugger attaches to debugee: When this mode is selected, NetBeans waits until a started task listens on a particular port for the debugger. The listening is detected by reading the standard output. This is the default option (only for compatiblity reasons). However, if possible, you should select Debugger listens for connections instead.