Access to debugging service?

We were doing this in CF9+ to get at the debugging service:

this.debuggingService=createObject('java','coldfusion.server.ServiceFactory').getDebuggingService();

How do I gain access to the equivalent service in Lucee?

If that same code doesn’t work in Lucee (Lucee bundles some classes that match the original names of CF for compat) then I’m guessing the functionality doesn’t exist.

What exactly were you doing with the debugging service in CF?

Hey, Brad. Seeing you this week?

We did this in CF9+ to catalog and collect into a separate working directory all the templates being hit in an old app in production usage, so that we would know exactly what needed to be migrated to the new app. Lots of old and dead files that didn’t need to move over. This was the easiest way to find out which were still in play. Now we have a need to access the same data under Lucee, but for slightly different reasons.

We’ll just give the original code a try, and see if it works.

@RevWatson No, I won’t be out there this week :confused:

I would recommend looking at a couple different things:

  • The fusion reactor line profiler which is what the Testbox code coverage tool is built on. It will tell you every CFM/CFC file that was hit
  • Look at Mark Drew’s code coverage extension for Lucee. It taps into the debugger information to get the list of files that have been hit.

In either case, you’d need to do some reverse engineering of those code bases to see how it worked and grab the bits you needed, but either one should work in theory.

1 Like

Look at the source code for the Lucee admin debugging pages. The file names correspond to the url action

1 Like