如何确定ColdFusion应用程序使用的文件? [英] How do I determine which files a ColdFusion application uses?

查看:69
本文介绍了如何确定ColdFusion应用程序使用的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将在没有版本控制且看起来像未使用的cfm文件(test.cfm,test2.cfm等)的现有ColdFusion应用程序上开始一些工作。我想了解一下哪些文件实际上是应用程序的一部分,以便可以在可管理的状态下将其放入git或subversion。



对这个?一个正则表达式和一些方法来查找和映射cfinclude和cfcomponent标签?

解决方案

Ben Nadel有一种方法可以从正在运行的模板检查实时堆栈跟踪。在我看来,您可以轻松地将其放入您的应用程序并将结果记录到数据库中。完成此操作后,您将对正在使用的内容和未使用的内容有所了解。



我认为,最简单的方法是启用调试(关于开发服务器的标准警告,等等)。标准的ColdFusion调试器将为您提供在执行单个页面期间使用的每个文件的完整列表。 ColdFire将在方便的Firebug扩展中执行相同的操作(单击ColdFusion然后单击Exec Times)。



应该指出,内置调试器甚至向您显示CFC调用中包含的文件,以及这些调用中包含的文件。它是全包





I'm starting some work on an existing ColdFusion application with no version control and what look like unused cfm files (test.cfm, test2.cfm etc.). I'd like to get a picture of what files are actually part of the application so I can get it into git or subversion in a manageable state.

How would you go about this? A regex and some methods to find and map cfinclude and cfcomponent tags? Is there some existing tool that does this?

解决方案

Ben Nadel has a method to examine the live stack trace from a running template. It seems to me that you could easily plop this into your application and log the results to a database. Once you've done that, you've got a good idea of what's in use and what's not.

I think the easiest way, however, is to enable debugging (standard caveat here about development server, etc). The standard ColdFusion debugger will give you a complete list of every file used during the execution of a single page. ColdFire will do the same thing in a handy Firebug extension (click ColdFusion then click Exec Times).

It should be pointed out that the built-in debugger even shows you the files included from CFC calls, and the files included from within those calls as well. It is all inclusive.

Ben Nadel on Stack Traces

Ray Camden's ColdFire

Sample of CF Debugging from a live page:

这篇关于如何确定ColdFusion应用程序使用的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆