Brian
03/06/2025, 3:27 PMErin Brewer
03/06/2025, 3:38 PMBrian
03/06/2025, 3:42 PMErin Brewer
03/06/2025, 3:46 PMBrian
03/06/2025, 3:52 PMErin Brewer
03/06/2025, 3:57 PMErin Brewer
03/06/2025, 3:57 PMjclausen
03/06/2025, 6:32 PMjclausen
03/06/2025, 6:33 PMErin Brewer
03/06/2025, 6:49 PMMichael Schmidt
03/06/2025, 6:50 PMjclausen
03/06/2025, 7:00 PMMark Takata (Adobe)
03/06/2025, 10:44 PMBrian
03/07/2025, 2:08 PMBK BK
03/07/2025, 4:42 PM@Brian: There is no way to record an entire scope in a log like that, is there?
You can use the following single line of code to dump the application scope as an HTML file within the default logs directory:
<!---<cfdump var="#application#" label="Application Scope" format="html" output="#server.coldfusion.rootDir#\logs\ApplicationScopeDump.html">--->
<cfscript>
writedump(var="#application#", label="Application Scope", format="html", output="#server.coldfusion.rootDir#\logs\ApplicationScopeDump.html");
</cfscript>
ColdFusion will format the dump in such a way that you can conveniently view it in the browser.BK BK
03/07/2025, 4:56 PM@Brian: On a somewhat consistent basis I'll get an error like, "Element MyVariable is undefined in APPLICATION." When I look in the application.cfc the variable is defined in the onApplicationStart method. Not only that, but if I restart the application the error goes away. It's like it randomly losing state or something. How can it be running without having run onApplicationStart?
My first guess is:
• either the application variable is being deleted (structdelete) or set to null, or
• the entire application scope is being deleted (structclear)
in a CFM page, in a function or in a CFC method somewhere.BK BK
03/07/2025, 6:31 PMsalted
03/11/2025, 3:27 AMsalted
03/11/2025, 3:28 AMsalted
03/11/2025, 3:29 AMMark Takata (Adobe)
03/11/2025, 3:30 AMsalted
03/11/2025, 3:30 AMsalted
03/11/2025, 3:30 AMsalted
03/11/2025, 3:31 AMsalted
03/11/2025, 3:32 AMsalted
03/11/2025, 3:46 AMBK BK
03/11/2025, 1:09 PM@salted :@BK BK that search won't help if the problem is in the application file itself
You perhaps didn't understand what I meant. The search for application-scoped variables is in fact a search for a possible cause of the issue in the application itself. As I had said earlier, you would then be looking for places where application variables are deleted, even if unintentionally.salted
03/11/2025, 1:09 PM