Debugging lucee in vs code

anyone using vs code to debug lucee? if so can you provide some info on how to get setup to build and debug the source? I followed the below link, but it seems like I am only getting errors trying to use maven in vs code.

I think if you are debugging the actual lucee codebase I would suggest you use Eclipse as (AFAIK) that is how @micstriit and @isapir do it.

I don’t think Code is setup to debug Java? I could be wrong though.

I use IntelliJ IDEA, but right.


I have used VS Code for some other java projects with maven. It kind of works with this project, but it always fails when running the tests. Also, it sets up some default debugging configurations (I assume this is based on the pom.xml file), but none of them seem to work.

I tried IntelliJ and imported the maven project. It imports 2 modules “Core” and “Loader”. I tried to debug both of them and receive the below error message. Maybe I am missing something, any help would be appreciated. I haven’t tried eclipse yet, so maybe I will make that my next attempt.

[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.301s
[INFO] Finished at: Mon Jun 18 18:00:04 MDT 2018
[INFO] Final Memory: 7M/16M
[INFO] ------------------------------------------------------------------------
[ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-clean, clean, post-clean, pre-site, site, post-site, site-deploy. -> [Help 1]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]

as per the docs, i think you need to pass in either test or fast to maven?

Cool IDE - pity they had to remove the debugging capabilities years ago! I hope they take another look at re-introducing it for Lucee.

I found this video in another post searching for some tips. So I think my approach is all wrong anyways. How can you make changes to the lucee code and be able to step into it using the java debugger? Is there some type of main method or something to start from or do you have to create a tomcat project and add the jar in some way to step into it?

has anyone tried this new debugging approach called time travelling?

here is a interesting debugging adventure with the webkit javascript engine

this software lets you do the same with java (free license for open source)

It is time for us to get a debugger that works in VSCode. IntelliJ, nice but not nice. Who loads an entire app to step out of code flow to do debugging? Eclipse, like thinking there. We want to grow the community and inline with the IDE is the only way to provide what all the other popular platforms are providing inside VSCode.

What do you mean “get” ? Why not contribute one rather than expect to be given stuff?

I understood this thread was to actually debug Lucee Java code rather than CFML application code?

There WAS a plain class that started up a simple server that you can then debug the Java line execution. As you say, doing ant builds is all well and good to get the latest version but what you need is how you debug as you are writing code to extend Lucee.

Maybe @micstriit can chime in and let us know?

In Railo there was a runner but for the life of me I cannot remember the name of the class. It basically created a Jetty instance and added the RailoServelet and configs and what not.

This is the Lucee debug project, it has a file that will create a jetty instance and set-up all the contexts and servlets for you. The file that does it is RunAsJavaApplication.

1 Like

Aha, thanks for that! This is what you run under Eclipse in debug mode (as a Java Application) that allows you to step through the Lucee Java Code.

1 Like

sir can you give document showing how to to edit lucee code in vs code. Using this project thanks in advance