Debug Build.Gradle filt

I have a build.gradle file written by someone else. I am completely new to Gradle. I am from Microsoft background. I am calling the gradle command and passing arguments from PowerShell console. I want to be able to debug this gradle script. Can anyone please help me with step by step details?