Answer a question

Is it possible to configure Visual Studio Code (installed on my Windows 10 client machine) to run and debug ColdFusion code, that is located server side in the path C:\inetpub\wwwroot\dir\dev?

I'm using ColdFusion 2016 (64 bit) together with IIS 6.2 on that Windows Server 2012 R2 Standard machine.

I opened the directory \\my-cold-fusion-server-as-FQDN\c$\inetpub\wwwroot\dir\dev in "Explorer" of Visual Studio Code to display and modify the cfm files.

I also configured the launch.json file in Visual Studio Code ("Run" > "Open Configurations") as follows:

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "type": "pwa-chrome",
            "request": "launch",
            "name": "Launch Chrome against localhost",
            "url": "http://my-cold-fusion-server-as-FQDN/dir/dev",
            "webRoot": "\\\\my-cold-fusion-server-as-FQDN\\c$\\inetpub\\wwwroot\\dir\\dev"
        }
    ]
}

I created a new file "test.cfm" (in the location \\my-cold-fusion-server-as-FQDN\c$\inetpub\wwwroot\dir\dev) and safed it with the following content:

<cfscript>
    var = "World";
    writeOutput("Hello #var#!");
</cfscript>

When I click on "Run" > "Start Debugging" in Visual Studio Code, a new Browser windows opens and displays exactly the same url (http://my-cold-fusion-server-as-FQDN/dir/dev) as specified in launch.json file.

But the file I wanted to be executed and being debugged, is not processed in the url (I expected: http://my-cold-fusion-server-as-FQDN/dir/dev/test.cfm). So additionally I am not able to debug that file using breakpoints in Visual Studio Code.

So I'm currently only able to view, modify, and safe cfm files in Visual Studio, and have to open the corresponding url to view that cfm file in my browser. But I'm not able to debug it using breakpoints in Visual Studio Code

Answers

Your step-debugger options right now are

  • https://www.adobe.com/products/coldfusion-builder.html based on Eclipse.
  • http://www.fusion-debug.com/ based on Eclipse (IIRC).
  • https://www.fusion-reactor.com/features/debugging/. Local step-debugger is available with a developer license.

There is no CFML step-debugger for VSCode at the moment, but the Adobe CF team announced that the Eclipse based CF Builder is being sunset for a VS Code based version which will include a step-debugger. This is due with the next major release of ColdFusion, mentioned in this slide deck:

"Public Beta walkthru of ColdFusion Next--Project Stratus", with Rakshith Naresh -- CFMeetup #268

Logo

开发云社区提供前沿行业资讯和优质的学习知识,同时提供优质稳定、价格优惠的云主机、数据库、网络、云储存等云服务产品

更多推荐