For those experiencing issues with the vscode exte...
# cfml-general
s
For those experiencing issues with the vscode extension Adobe CF Builder Extension after install
Copy code
All features under Project Manager, CF Servers, RDS Dataview, and RDS Fileview are not working. Examples: not able to Create Project or Add Server.
please vote https://tracker.adobe.com/#/view/CF-4214633 Im trying to get a session with an adobe dev, so that I can help debug the problem @lmajano @elpete @bdw429s @Mark Takata (Adobe)@mithlond (I tagged those that have mentioned having issues, not sure if they are this exact one)
b
I find it annoying that the bug reports for the extension are spread across both the adobe prerelease forums and their public ticket tracker.
s
it is also a little confusion how to post a ticket since there is a
ColdFusion Builder
Product, but that, is not this
b
ugh,
I thought this was going to be called CF Builder
And it would just be the new version
m
They're all being looked at, but yes, not ideal. Last night we had a CF Core meeting where we discussed improving and simplifying the bug process. We will be making a VS Code extension sub-set for ColdFusion Builder (and removing the other versions)
Also, the name WILL be ColdFusion Builder Extension for VS Code
That was also discussed and put in place to fix
m
@Scott Steinbeck the issue I had was filed as https://tracker.adobe.com/#/view/CF-4214559
s
thanks @mithlond
m
In that issue's comments, the ACF team requested a session with me so they could see it happening as well, I just haven't had time yet where I could sit and do that. I hope to have a few minutes sometime this week though.
And everyone, feel free to vote for both issues if you haven't already 🙂 🗳️
s
Also Paul commented that there may be some issues with conflicting vscode settings causing the panel not to work
m
So, just a heads up, so far every instance of this issue that we've screen shared with a person about has been a result of improper setup (or misunderstanding of how workspaces + projects work). That's on us for needing to improve our documentation. But, really quick: 1. Java11 + JAVA_HOME setup 2. Workspace must be the parent to your project. i.e. they cannot be the same folder. And the folder for your project must live inside the currently active workspace. I had these two exact issues when I first started using the extension. Once that was cleared up, no more of the "buttons do nothing" issues for me. I'm not saying that's what's happening for everyone, but its possible, so do please double check that you've set things up right and your project folder lives inside your workspace. And yes, I agree, the functionality for not having these things set up should be "Error: please set up your stuff like so" not "literally nothing happens when you click things"
b
Yeah, some proper error messages would go a long way 😉
interesting, you seem to be saying java 8 is not supported. Is that correct?
m
Erm, sorry, Java 8 IS supported.
b
Is there a particular reason for that since Java 8 is still supported for actual CF installs.
Ah, ok
m
Java 11 is "recommended" for some reason
So I just use it
b
"recommended" is fine
TBH, I don't ever mess with 'workspaces' or whatever in Code. I just open a folder and start editing! That's what I like about it. It's way more lightweight than the cumbersome process of Eclipse having to jump through hoops just to get started
It sounds like you're saying I can't just keep opening up a folder i.e.
Copy code
> code .
and hammering at it-- I've got to start creating workspaces and such before I can use the features?
I'll add the existing CFML extensions for VSCode don't have any requirements like that, though I suppose they also don't have the same features...
m
Yes. You open a workspace (it can be the main wwwroot) and then open or set up a project inside a folder that lives in this workspace. That allows the extension to understand what LS features are active for the code that lives inside the project. Because it can be CF2016, CF2018 or CF2021, plus there's the server that is set up for each project.
If you just 'open it up and start coding' you'll get a limited set of features.
Once I set up my folder for workspaces, and set up my projects, it is seamless.
And adding a new project is like a couple seconds if the server I'm using is there already.
s
I get stuck at the beginning, i cannot create or import a workspace. nothing happens, and even with devtools open, there is no error
im curious, is adoptopenjdk-11.jdk supported?
also, i go get the
Copy code
ERR command 'cfml.server.create' not found: Error: command 'cfml.server.create' not found
like @mithlond so i upvoted that issue as well
r
@Scott Steinbeck I've been using the extension with adoptopenjdk-11.jdk.
s
thanks for confirming
on the syntax highlighting, i have noticed that custom html tags do not get colored, which makes it difficult to use for those who use components in javascript frameworks like React, Vue, etc. I will make a separate ticket for that
j
Perhaps a video of watching someone set it up correctly and make the connections to repos/datasources/servers would be beneficial? Having a concrete example to model after is always appreciated - maybe even help (me) to not do the 'open it up and start coding' path.
s
here is the ticket for issues with parsing “Syntax highlighting for custom html tags & html components” that i have found https://tracker.adobe.com/#/view/CF-4214764 please vote
p
Hello all. I am VERY interested in getting this working. I will go through all of the notes here and report back ASAP. 👍🏼
m
I'll be honest. I don't really want to mess with workspaces. I just want to open up a folder and start coding. If I have to figure this out to use the extension I'll try it, but long term it's maybe not ideal for some. I'll have to see if the benefit is there, once I can get it to work.
d
What's the deal with having that folder structure? A project folder inside a workspace folder. Currently I have vscode workspace like this: /intranetapp /api ——> c:/sites/api /config /models /accounting /timesheets /papo Application.cfc intranetapp.workspace I would prefer not to /intranet-workspace /api /intranetapp intranetapp.workspace
Vscode and Vim PDE allows me to make any folder a workspace and add any external folder to that workspace so I don't have to create nested workspace and project folders in order to “group” folders. If it didn't allow for this I would not be able to to add that same folder to multiple workspaces.
In my example I can have my api folder in multiple workspaces depending on which app depends on it.
m
I wasn't part of this spec so I'm not sure. However, I know from using Visual Studio Community for many years that the idea of working inside a workspace is kind of key. I think (don't quote me) that what happened was that the designing team, years ago, combined the required "workspace" thing from VS Code with the idea of projects from Builder, and decided they had to live inside one another.
For me it was annoying to start with but after thinking it through a bit I got my workflow setup in that mindset and its fine.
b
What if we could just have a config file sitting in any directory which we wanted to have a server defined in (like a
server.json
😉 ) and Code could just be smart enough when working in that directory to say, "hey, there's a server definition here, let's use it!".
I don't see me going back through my dozens of projects and creating workspaces or whatever out of them. I've really been enjoying not needing that part of the old CF Builder.
p
Hi all, sorry for the long delay. Has anyone managed to get this working yet? I have finally gotten it to the point where everything seems all SETUP correctly, but am now unable to get the Debugging working. I receive the following error in the Debug Console when attempting to "Debug As ColdFusion Application":
showError :: "Error on RDS call :: Error connecting to JVM for debugging at localhost:5005."
323 :: {"statusCode":500,"data":"-1:Error connecting to JVM for debugging at localhost:5005.\nCould not attach to the VM at port 5005\nYou must specify this debugger port in the JVM settings of your application server, for example:\n\t-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005\nYou will also need to make sure that another debugger is not currently connected to the CF JVM at the same port (5005)\n\nRoot cause -> \nConnection refused: connect\r\n\r\n\r\n","errMsg":"Error on RDS call :: Error connecting to JVM for debugging at localhost:5005."}
Error on launchRequest :: 13
showError :: "Error on RDS call :: Error connecting to JVM for debugging at localhost:5005."
Debugger stopped
@Scott Steinbeck @bdw429s @Mark Takata (Adobe) @mithlond @Rodney @Jim Frankowski @mike42780 @Daniel Mejia
j
Sorry, Sergio, but I have had to pivot away from trying to figure out VSCode CFBuilder for the time being and never used the debugger in Eclipse/CFBuilder. The Adobe debugger pages (https://helpx.adobe.com/coldfusion/developing-applications/developing-cfml-applications/using-the-coldfusion-debugger.html) say you can specify which port even though the docs are all about eclipse. Congrats on getting things set up that far.
r
I've had to pivot away from using it but for different reasons. I did get the debugger working with CF 2021 before I stopped using it though. I was using CF 2021 in Commandbox and I had to add
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
to my JVM arguments in the admin.
m
Thanks for posting what you're seeing here, everyone. I haven't pivoted, but have been busy with a big project and haven't had time to look into it more at present. I know I'll get back to it and will look closer at what y'all have posted here as I try to get it off the ground 🛩️
fwiw, I'd love to see it be like Chrome's dev tools: you install it, and it works. No setup or configuration needed. Anything that can be done to make it not be "some assembly required" will be fantastic. I'm still really excited to try it out once I get it running.
m
Mith, I had similar feedback. here's the issue. VS Code is a PWA. It lives, largely, in a sandbox. The features the Builder extension have require a java engine. However, the security implications of a sandboxed PWA just going in and either installing or looking up info on things like installed java engines are... well not good. It is secured like that for a reason, but it makes it tough to get it to "just work" when you're trying to connect to servers, debug stuff, etc. Is it possible? Maybe. Certainly in other IDEs that have more hooks in place. We are definitely hearing the comments. Developer experience is important to me.
m
gotcha - yeah, and Chrome's is pretty self-contained, so it's a different animal
m
Not saying we're not trying, believe me I was PISSED when I saw how much work it was getting this running. But the engineers walked me through the internals over several hours and honestly, yeah, like a LOT of it is just security which I can't argue with.
m
and some of that security is, like you said, due to VS Code's architecture itself and not something you can or want to try to circumvent. I wonder if there's a way for the tool to provide a checklist of everything that needs to be in place and highlight them in green if they're set up right, or red if they need attention, with directions right in the tool on what to do to resolve outstanding setup items. If there are hoops to jump through, kind of tee it up for the user
having the debugger setup instructions in the pdf doc is good, but in the tool itself might be even better
m
Yeah, like, I think the developer setup experience could be 100x better for sure. Even some of the settings have names that I was like... what does that mean?
j
Not to be a broken record here, but has there been any thought about an instructional video? A (moving) picture is worth 1,000 words, right?
p
@Rodney - Can you please give me a little more detail on how you got that far? The "Java and JVM" tab is missing in my CF 2018 CommandBox admin, but I did find a file named
wsproxyconfig_jvm.config
in the
[cf2018server]\WEB-INF\cfusion\bin
folder, and added the
-Xdebug
line to that, but still with no success. I continue to get the same error. 😞
Here is what that file now looks like:
Copy code
#
# VM configuration
#
# Where to find JVM, if {java.home}/jre exists then that JVM is used
# if not then it must be the path to the JRE itself

java.home=$JAVA_HOME$
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
b
@PwrSrg We can help you better with CommandBox questions in the #box-products channel, but the short answer is the
jvm.config
file you're asking about is unique to CF's Tomcat bundle and doesn't exist on any other servlet container. CommandBox allows JVM options to be set in your
server.json
file
Copy code
server set jvm.args="['-Xdebug','-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005']" --append
As far as the
wsproxyconfig_jvm.config
file-- I have no idea what that is or why Adobe included it in their WAR distribution. It's not used at all.
p
Great, thanks. I will try that.
I am documenting EVERYTHING for the Adobe team to add to their installation docs.
m
Thanks @PwrSrg - next best thing to no-config is clear and complete docs, for sure, so any bits not covered yet that we can collect will help
r
@PwrSrg I added it to my server.json.
{ "jvm": { "args": "-XDebug..." } }
b
☝️ Just a note
jvm.args
in your
server.json
can be either an array or a string. The syntax for the
server set
I showed above will add an arrary, while the code snippet in Rodney's message shows a string. Either is fine, but you can't mix the two 🙂
p
Hey @Mark Takata (Adobe) - So at over 50+ hours into this, I finally just had to abandon CommandBox, and get a local CF 2018 server up and running to get even the most BASIC setup working as advertised:
cfusion » wwwroot » workspace » project » index.cfm
I am now attempting to create the exact same workspace in my real environment:
client » workspace » project » index.cfm
But I keep getting the same error:
Copy code
Selected file is not in the document root of the server. If the project is not in the document root, create a linked folder to the document root ( selecting Project manager > Add Linked Folder ).
I have created countless linked folders in as many configurations and directions imaginable, but nothing works. HOW do these "Linked Folders" actually work?? What is CF Builder trying to accomplish behind the scenes? I thought it may be mapping external paths on the server, but there is nothing there either. What am I doing wrong?? 😖 And WHY is this so damn difficult?!? 🤬
m
So, I don't use the linked folders in my daily workflow. My environment is: Workspace: /wwwroot/ of the cfusion install Project: Folders created in that wwwroot Now, when you set up the VS Code extension and created a server, you chose a couple folders. This second scenario you're describing, is "client/workspace/project/index.cfm" inside the "document root" you set in your server settings for the server you're choosing for the project?
p
Keeping your projects in your cfusion wwwroot is super convenient, but no real-world environment will EVER be setup that way. So "document root" is another very confusing term. What does Builder think that actually means? The first few times I tried it, I pointed to the actual document root of the project, but couldn't get it to work. So I then tried pointing the "document root" to the CF WEB ROOT, and that is what finally worked in my most basic example.
I even tried creating a Symbolic Link from the CF web root to my project document root, which works perfectly fine on the server. But because CF Builder isn't smart enough to "see" the connection, it still gives the same error. What is super confusing is that Builder seems to ONLY be able to create "Linked Folders" pointing in the WRONG direction. 🤔
Needless to say, it is also not smart enough to "see" any CF Mappings created directly on the CF server either, which was very surprising. No matter what I try, it simply refuses to let anything work ANY other way other than it's own opinion. 😖
m
So, just to be clear, I've been a ColdFusion developer for over 25 years, and my LOCAL development environments have absolutely 100% been set up that way, many times. As well as other ways. I develop locally, push to git and have that push out to my other environments. Or I might have a remote server I log into that I dev on that then checks in to a software versioning system. Or in some cases I mimic the production environment exactly on my local box (not ideal but I've done it) or use containers. It all depends on the project, the app, the company you're working for. It almost sounds like you're trying to edit things inside a production environment on the actual server. Which I would most definitely recommend against doing, no matter the IDE. In any case, it may just be that this is not the IDE for you. Its OK. We can't please everyone. We'll keep trying to make it better, but you might prefer a different way of coding that doesn't match what Builder does.
p
Wow.
Noted.
r
The extension does not work well with links or UNC paths such as \\server\share.
p
FYI - 22 years here myself, not that that means anything.
Thanks @Rodney, though I am testing ALL of this directly on my C drive to avoid that exact issue.
m
We are continuing active development of the extension and are looking at feature requests on tracker.adobe.com to put on the docket for improving the extension. This is a long term project for us and we're dedicated to making it better. We are also looking into creating plugins for some of the other popular IDEs out there, so hopefully there will be other options available as well.
530 Views