1

I'm running an instance of ColdFusion 2021 with a local server. I have a project in the wwwroot folder of the ColdFusion folder, which I called my workspace in VS Code. I then added my root folder of my actual website (nicknamed tuba) as my project under project manager. I have RDS enabled on my administrator dashboard, and I've entered my user and pass for it in VS Code as well, and that connection works. I've connected my server and all of my pages appear in the project manager, but the issue is when I right-click 'run as ColdFusion application' on my page, the URL populates without the paths correctly. It only appears as the page itself. IE:

http://127.0.0.1:8501/mypage.cfm

instead of

http://127.0.0.1:8501/path/to/mypage.cfm

Is there some setting I'm missing somewhere? I'm totally stuck and haven't been able to find an answer on Adobe or on SOflow. Any help would be appreciated. Thanks.

1 Answer 1

0

Molly, this is a fairly common challenge, which can indeed seem tough to sort out. You just need to tell CFB what URL it should use to browse that folder (or a folder it's within).

Briefly, that's about defining a "url prefix" for your "server". Edit the "server" that the project is linked to, and go to the "URL Prefix" tab there then click "add new", naming first the path to the folder for your project then the url to be used to browse that folder. Hit "add" to save that link, and then hit "finish" to save the server definition. Then try the "Run as ColdFusion Application" feature again.

Note this would not be necessary if your project WAS in the webroot of the defined server (or what's defined in the "Local Server Settings" tab when editing the "server" as the "document root", assuming the server is indeed defined to be a "local" one).

A challenge is that there are not only these many moving parts in CFB, from defining a "project" (and a "workspace"), to defining a "server", then linking the project to the server, which are themselves not so obvious. But then also different people can have a wide range of setups (with the CF "server" being a "local" or "remote" one), which can mean that finding the right solution for a given problem can be tough.

(And plenty about CFB can be confusing, as it's still new to so many. It also carries over some notions from the old Eclipse-based CFB. Then add to it the fact that CF is a web app server, which requires this wiring of the IDE to the server--which is of course not needed for most programming languages that VSCode supports.)

That said, this "url prefix" feature is indeed documented, as is the "server" feature (and "the projects" feature, and so on). Still, it's understandable that one might not have thought to look at it/for it. And even then the discussion there does not so clearly present itself as the solution to your challenge. Anyway, see the CFBuilder for VSCode docs on the "Server" feature, and within that see the section, "URL prefix tab".

Let us know if that gets you going. To be clear, getting this working also then opens the door to using the debugger feature: people who never get the debugger working often haven't noticed they first can't get that browse capability (Run as CF App) working.

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.