Java Max 8 and xDebug ( max.java.config.txt)

Jan M's icon

I know Java/mxj is not getting much love (in maintenance mode).... Still in my current project I came to a point where writing my own mxj external Java seems to be the best option.

For debugging (back in the days of Max 6) I used to modify the max.java.config.txt and uncommenting the relevant options;

max.jvm.option -Xdebug
max.jvm.option -Xnoagent
max.jvm.option -Xrunjdwp:transport=dt_socket\,address=8074\,server=y\,suspend=n
max.jvm.option -XX:-UseSharedSpaces

Since now in Max 8 everything is bundled in Max.app I located the file in the bundle and tried the same. Though
adding the jvm option

-Xrunjdwp:transport=dt_socket\,address=8074\,server=y\,suspend=n

crashes Max as soon as an mxj class is loaded.

Is there still a way to use xdebug with Java/mxj?


Jan M's icon

I found the solution:
If I change the port and skip -XX:-UseSharedSpaces it work :)

Final JVM xDebug config i use is:
max.jvm.option -Xdebug
max.jvm.option -Xnoagent
max.jvm.option -Xrunjdwp:transport=dt_socket\,address=9074\,server=y\,suspend=n

wWith a matching debug confing in InteliJ IDEA (usinf the Comuntity Edition) it connects properly.