cfconfig export issue

If I put this file in my commandbox root and run:

cfconfig export from=./ to=cfconfig.json

the json output only has log and mail settings; it appears to be missing all the debug stuff.

lucee-web.xml.cfm (8.9 KB)

Ahh, right-- debug. So ironically, debugging info is one of the only things not implemented for Lucee server (debug settings are fully supported in CFConfig for Adobe ColdFusion due to client support). I actually never use those settings myself and have had almost no demand for them. Sorry to say that after telling you to use CFConfig! That said, I doubt it’s much work at all to add support it, I’ve honestly never even looked at it since not many seemed to care about those settings. CFConfig is written in CFML and open source so anyone can contribute support for the default settings. CFConfig is also professionally supported, so you can pay to have it added right away if you wanted.

Otherwise, looks like there was a ticket put in a while back for this:
https://ortussolutions.atlassian.net/browse/CFCONFIG-21

I can take a look at adding support for the debug items in the next few weeks if I have time or you could also try to work with someone like Mark who entered the ticket to see if he had plans to add it (he’s send me several pulls for CFConfig).

Can you let me know if there’s any specific debug settings you’re using? Looking at the web UI, there’s a series of boolean checkboxes which would probably be pretty straight forward. Changes for this would be in the services project only. I could probably add those in an hour.

Then it looks like there’s the debug templates which is a bit more involved, Seems each debug template has

  • type
  • path
  • label
  • ip range
  • full name
    … and then a “custom” property which is a big URL encoded set of key/value pairs specific to that template. Changes for this would involve adding some new commands to the CLI project as well to support stuff like “cfconfig list debug-template”, “cfconfig save debug-templates”, etc. This is probably a few hours worth of work just to get all the pieces in place since it involves a config item which will be an array of items which also requires special treatment for “deep” inspection on the “cfconfig diff” command.

I just added support for all the basic Lucee debug items in CFConfig. Run an “update --system” and you should see a new version of “cfconfig-service” that is version 1.4.1. It includes the following:

  • debuggingEnabled - Enable debugging

  • debuggingDBEnabled - Database Activity - Select this option to log the database activity for the SQL Query events and Stored Procedure events.

  • debuggingExceptionsEnabled - Exceptions - Select this option to log all exceptions raised for the request.

  • debuggingQueryUsageEnabled - Query Usage - Select this option to log the query usage information.

  • debuggingTracingEnabled - Tracing -Select this option to log trace event information. Tracing lets a developer track program flow and efficiency through the use of the CFTRACE tag.

  • debuggingDumpEnabled - Dump - Select this option to enable output produced with help of the tag cfdump and send to debugging.

  • debuggingTimerEnabled - Timer - Select this option to show timer event information. Timers let a developer track the execution time of the code between the start and end tags of the CFTIMER tag.

  • debuggingImplicitVariableAccessEnabled - Implicit variable Access - Select this option to log all accesses to scopes, queries and threads that happens implicit (cascaded).

  • debuggingMaxLoggedRequests - Maximum Logged Requests

Thanks!

I’ll give it a shot, thanks!

It doesn’t look like this traps the debug templates and assigned IPs, correct?

That is correct. LIke I stated above, I just did the main page of check boxes. The debug templates would be a bit more work since it’s a list of objects and has additional dedicated CLI commands I’d need to stub out, and related tweaks to the diff command to handle the complex objects. Not impossible, just more than I felt like doing that day.

Is debugging now fully implemented for the Lucee server?
I tried the commands above, and they activated the following debug options:

I don’t know why the “Database Activity” is not enabled tho.

Is there a way to create a debug template with cfconfig? Because even tho the settings are
enabled, they will only show up if a debug a template is created.

.cfconfig.json

{
	"debuggingEnabled": "true",
    "debuggingDBEnabled ": "true",
    "debuggingExceptionsEnabled": "true",
    "debuggingQueryUsageEnabled": "true",
    "debuggingTracingEnabled": "true",
    "debuggingDumpEnabled": "true",
    "debuggingTimerEnabled": "true",
    "debuggingTemplate": "classic.cfm",
    "debuggingImplicitVariableAccessEnabled": "true",
    "debuggingMaxLoggedRequests": "true"
}

Thanks :smile:

I’ve never implemented the debugging templates in CFConfig mostly because I never use them myself and no one ever asks for them. I would welcome a pull request to add support for them, however. I’ve not looked too deeply into how they work, but I assume the custom per-template attributes are handled similar to cache connections. If it’s rather important to you and you don’t have the time or desire to send a pull, we can chat about sponsoring the development of the feature.