If using Tomcat, /opt/lucee/tomcat/lib/
(or its Windows equivalent) appears to be the best place for luceedebug.jar, though you can put it wherever you like (except most likely not /opt/lucee/lib/
).
Then follow the instructions in the Install and Configure Agent section of the luceedebug GitHub repo README, making sure of course to change both occurrences of /abspath/to/luceedebug.jar
in the -javaagent
argument of your java invocation, for example in /opt/lucee/tomcat/bin/setenv.sh
(or setenv.bat
), to match the actual path of the jar file.
In my case it’s appended to the string value of the JAVA_OPTS environment variable, though it can also be CATALINA_OPTS.
Example:
JAVA_OPTS="-Xms512m -Xmx512m -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=localhost:9999 -javaagent:/opt/lucee/tomcat/lib/luceedebug.jar=jdwpHost=localhost,jdwpPort=9999,debugHost=localhost,debugPort=10000,jarPath=/opt/lucee/tomcat/lib/luceedebug.jar";
Then restart Lucee.
You might also need to restart VS Code after you’ve installed the extension, then follow the instructions in the VS Code luceedebug Debugger Extension section of the README for configuring the JSON for the extension.
However, at this point I am stuck. Even though it appears to be connecting to Lucee, as the call stack in vscode Run and Debug has expected items such as various ajp-nio entries, references to Catalina, luceedebug-worker, main, etc, nothing appears in the VARIABLES nor WATCH areas. So either it’s not fully working, or I don’t know actually how to use vscode’s debugger because I’ve never used it before. Decades of old school dump debugging have served me well enough I guess. 
Still it’s frustrating. Having followed all of the instructions and the extension getting a response from Lucee, it seems I’ve done everything properly, yet still no joy.