5

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

3
  • 2
    What you can do is enable debugging in your Admin page. That will expose variables in the form and url scope. What you can also do is use the <cfdump> tag or writedump command to look at other variable values. Each has an abort attribute which comes in handy. Commented Oct 27, 2020 at 14:54
  • Adobe finally released vscode extension: marketplace.visualstudio.com/…. However, I can't figure out how to make debugging work. Commented Sep 19, 2022 at 18:43
  • I asked a related question here: stackoverflow.com/questions/73778238/… Commented Sep 20, 2022 at 12:08

1 Answer 1

6

Your step-debugger options right now are

UPDATE 2022-09-20

The official Adobe ColdFusion Builder extension for Visual Studio Code was released at the end of July 2022. They have provided a Getting Started walkthrough as well. This includes a step-debugger, but odds are it will only work with the latest and more recent versions of Adobe ColdFusion.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.