[Looking for Charlie's main web site?]

Fixing CF: "Hey, how come ColdFusion debugging output is not showing up in my localhost testing?"

Note: This blog post is from 2018. Some content may be outdated--though not necessarily. Same with links and subsequent comments from myself or others. Corrections are welcome, in the comments. And I may revise the content as necessary.
This is a problem that has troubled many CF users for some years (especially as they have moved to later operating systems): they find that ColdFusion debugging output does NOT appear to them when testing using a URL with "localhost" for the domain name but it DOES appear if they use the 127.0.0.1 ip address instead.

TLDR (and update since initial post):
If you can add ::1 to the list of debugging IP addresses in the CF Admin, that should solve this problem. If you cannot, that problem was fixed a few months after I wrote this, in CF2018 update 2 and CF2016 update 8, released in Feb 2019 (and it's no longer a problem on CF2021 and above, of course). For those not yet running those, if you find that adding ::1 just turns into 0:0:0:0:0:0:0:2, read on.

For more on the matter, including why it happened, solving it, etc., read on.

[....Continue Reading....]

Comments
interesting
# Posted By Animesh Dutta | 8/24/18 10:25 PM
The easiest solution is just to open your hosts file and put

127.0.0.1 localhost

This acts as a local DNS proxy and redirects all requests for "localhost" to 127.0.0.1

This actually solves quite a few other issues with using localhost that have plagued folks for years, not just CF related.
# Posted By Russ | 8/25/18 3:05 AM
Thanks, Russ. I had indeed mentioned the option of editing the hosts file and showed the value to use. But I saw on review that I had made a mistake in the value I showed, so I have corrected that. You didn't indicate seeing that but I do thank you for mentioning this and causing me to correct that.

I also tweaked the opening to make it more clear that that's an option (in the "in brief" section--which I added with you in mind, as I know you tend not to like "all the waffle".)

Again, though, "the waffle" is more for the matter of our need (for now) to edit the neo-debug.xml because CF doesn't accept adding the ::1 address for us. That's the real problem I wanted to point out, and how editing that file is a workaround, and the challenges with that.

And as I also noted later in the post, editing the hosts file does not always suit everyone. In the forum thread where this came up (mentioned in my bug report), a poster expressed that editing the hosts file had not worked for him. Again, I alluded to some of the possible challenges with that and decided not to make this a post about that but about the CF issue instead.

Still, again I have tweaked the post a bit based on your comment and I thank you for that.
Thank you so much. It worked!
# Posted By Kavita | 10/28/19 12:25 PM
Thanks for the feedback, glad to have helped.
Copyright ©2024 Charlie Arehart
Carehart Logo
BlogCFC was created by Raymond Camden. This blog is running version 5.005.
(Want to validate the html in this page?)

Managed Hosting Services provided by
Managed Dedicated Hosting