Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8113149
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:44:08+00:00 2026-06-06T02:44:08+00:00

Problem I want to use the interactive debugger with IntelliJ. Unfortunately, I can’t convince

  • 0

Problem

I want to use the interactive debugger with IntelliJ. Unfortunately, I can’t convince IntelliJ to load and compile the plugin. However, I can do gradle clean build and the plugin builds and runs its tests as expected.

Specifically, I’m trying to debug local changes to gradle-js-plugin and IntelliJ says it can’t find com.google.javascript.jscomp.CompilerOptions as well as spock.lang.Specification. (I’m thinking maybe it’s something about the way they are loaded, but that’s a guess.)

Things I’ve tried

NOTE: I didn’t revert any processes between steps.

0. My First Guess

I noticed a howto on docs.codehaus.org. IntelliJ couldn’t find org.gradle.launcher.GradleMain, so I’ve adapted it to use GradleLauncher with the following:

import org.gradle.GradleLauncher

class GradleScriptRunner {
    public static void main(String[] args) {
        GradleLauncher.newInstance(
            "-p", 
            "/path/to/gradle-js-plugin/src/test/resources/build.gradle", 
            "clean assemble"
        )
    }
}

Per GradleLauncher’s documentation.

Outcome: IntelliJ won’t compile the project.


1. Per Peter Niederwieser’s answer Fix idea project & debug via plugin

Steps

  1. ~# cd /path/to/gradle-js-plugin && gradle cleanIdea idea
  2. Opened the newly created project and attempted to debug using the ScriptRunner from step 0.

Outcome: Project compiles (yay!), but I can only hit breakpoints in GradleScriptRunner.groovy.


2. Per Peter Niederwieser’s answer run gradle CLI w/ special options

1 & 2. Merged for clarity:

~# export GRADLE_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005"
~# gradle clean assemble
Listening for transport dt_socket at address: 5005
  1. Configure IntelliJ to connect to this port and start debugging (see image):
    How I configured the debugger

For this step I tried the following .gradle file configurations:

1. Use only build.gradle

–build.gradle–

apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'js'

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
    }

    dependencies {
        compile findProject "/path/to/gradle-js-plugin"
    }
}

repositories {
    mavenLocal()
    mavenCentral()
}

Outcome:

FAILURE: Build failed with an exception.

* Where:
Build file '/path/to/gradle-js-plugin/src/test/resources/build.gradle' line: 13

* What went wrong:
A problem occurred evaluating root project 'resources'.
> No such property: findProject for class: org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 8 mins 50.498 secs

2. Use both build.gradle and settings.gradle

–settings.gradle–

include "/path/to/gradle-js-plugin"

–build.gradle–

apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'maven'
apply plugin: 'js'

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
    }
}

repositories {
    mavenLocal()
    mavenCentral()
}

Outcome:

FAILURE: Build failed with an exception.

* Where:
Build file '/path/to/gradle-js-plugin/src/test/resources/build.gradle' line: 5

* What went wrong:
A problem occurred evaluating root project 'resources'.
> Plugin with id 'js' not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 13.553 secs

My Setup

Gradle

~# gradle -v
------------------------------------------------------------
Gradle 1.0
------------------------------------------------------------

Gradle build time: Tuesday, June 12, 2012 12:56:21 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Ivy: 2.2.0
JVM: 1.7.0_04 (Oracle Corporation 23.0-b21)
OS: Linux 3.2.0-2-amd64 amd64

Java

~# java -version
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)

IntelliJ

IntelliJ IDEA Ultimate 117.499 w/ Bundled Gradle plugin

Hoping for

Any tips that’ll get me into debug mode within the plugin.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:44:11+00:00Added an answer on June 6, 2026 at 2:44 am

    First, it sounds like there is a problem with your IDEA Gradle project. If you run gradlew cleanIdea idea and then open the generated project from IDEA (rather than using the JetGradle plugin), all should be fine.

    Second, if you still can’t get the GradleMain/GradleLauncher (the former class does exist) approach to work, another approach is to debug the Gradle build as an external application. For that you need to add -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005 to the GRADLE_OPTS environment variable, run the build from the command line, wait until it suspends, and then start a “Remote” run configuration (with corresponding settings) from IDEA. At that point the debugger should connect to the Gradle process and you should be up and running.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on machine learning problem and want to use linear regression as learning
I want to use MSVC compiler to build a DLL file. The problem is
I want to use cglib as my proxy mechanism for spring. problem is, i
The problem I'm having is that I want to use STL's sort with a
this is a post back problem (I don't want to use the client side
I have a problem. I want to use a LINQ query against this database:
I have a problem with dojox.form.Uploader. I want to use it to attach files
I am having a problem with my query. I want to use SUM in
I have a problem, I have a saved text file, I want to use
I want to use the Model-View-Controller template while writing my Web App. The problem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.