google-app-enginestackdrivergoogle-cloud-debugger

Using Stackdriver debug for non-Java JVM languages


The Stackdriver debug interface complains when you have a non-java file in your source (such as a Groovy file).

The way a debugger normally works is that it matches a filename and line number to the sourcefile and linenumber attributes included in the class file, so I'm not sure why support for non-java source files was disabled.

Did anyone have any luck "tricking" the interface into accepting non-java files (e.g. by renaming them), or have any information about whether Google is planning to add support?


Solution

  • This limitation is hardcoded in the Stackdriver Debugger Java agent. See https://github.com/GoogleCloudPlatform/cloud-debug-java/blob/master/src/agent/internals/src/main/java/com/google/devtools/cdbg/debuglets/java/ClassPathLookup.java#L186

    The reason for the limitation is that the agent was built for java. It understands Java conditions and expressions (and doesn't understand other languages expressions). The agent can be modified to handle other JVM languages with relatively few changes. However, the file:lines much match the info in the class files and the expressions parser modified to match the target lanuage.