Trying to get the debugger in CF Builder 2018 to work with my sites that run under IIS.
My environment is CF 2018 server configuration, CFB 2018, IIS 10, Win 10 Pro - all running on the same machine.
I know I am close because I added the CF web root as a project in Builder, created ...\cfusion\wwwroot\debuggerTest.cfm with a breakpoint and it does work.
I tried adding a new local server configuration in builder for port 80 and setting it as the server for the IIS project I want to debug but the breakpoints never fire, I think probably because it's not finding RDS? Not sure how all that ties together.
What is the trick to getting this to work?
Also, I am not opposed to moving the cf web root to run under IIS .. I did try that but couldn't access the administrator.
The way that RDS works is, the client sends messages via HTTP to the server using the specific URL /CFIDE/Main/ide.cfm (if I recall correctly off the top of my head). The file corresponding to this URL doesn't actually exist, but the server will pretend it does if RDS is enabled. By default, this will only work if (a) RDS is enabled, and (b) the web server is configured to forward the request to CF. So, the web server can't have anything in place to block those requests. This can get kind of complicated with newer versions of CF and IIS, which both have security improvements that have the side effect of making RDS less likely to work. RDS is a pretty serious security issue waiting to happen, and you don't want to expose it on public web servers as RDS has access through CF to both the file system and whatever databases CF is configured to talk to.
I would recommend that you avoid using RDS if possible. Being able to set breakpoints in CF is a lot less valuable than in other languages, because of the simplicity of CFML, the generally useful error messages that CF provides, and the execution model of web applications in general. I haven't really felt like I needed breakpoints in CF, compared to other languages which are a lot more complicated in comparison.
If you're set on using breakpoints, I'd recommend you take IIS out of the local development loop. I used to feel like I needed to replicate the entire production environment on my personal workstation, but over time I found I didn't really gain anything from doing all this. Just use CF's built-in web server locally, then push changes to a code repo and pull them to other servers and you'll be fine. The vast majority of web applications don't rely on anything specific to IIS. Of course, if you're using something specific to IIS like client certificates or Kerberos authentication, that won't work for you, but getting that set up in your Windows 10 environment will be its own problem.
Dave Watts, Eidolon LLC
Thank you for your response Dave.
Agreed about RDS and security for production - but this is an isolated development environment.
I got away from using IIS in development for awhile however found that trying to maintain matching server functionality between different products was tedious, and sometimes couldn't even be done.
The debugger is my preferred way to work. I could survive without it, I don't even need it very often but sometimes it makes my life easier, at least when I can get it working!
Well, in that case you need to make sure that IIS passes requests to /CFIDE/Main/ide.cfm to CF, and that CF responds to them. I'm not entirely sure how you'd do that to be honest. My first try would be to create a virtual mapping to /CFIDE within IIS that points to CF's /CFIDE directory. If that doesn't work, create your own /CFIDE directory within the IIS web root, and create the subdirectory and file within that. CF is hard-wired to send those requests to a different servlet (the RDS servlet) instead of processing them normally. Give it a try and let us know!
Dave Watts, Eidolon LLC
Access to CFIDE is blocked in [drive:\CFinstallDirectory]\config\wsconfig\[index]\uriworkermap.properties
All I needed to do was remove the ! from the line !/CFIDE/* = cfusion
For anybody stumbling on this in the future - be aware that this opens up access to CFIDE for all sites that use the same configuration directory. If you need things tightened down better than I do, you can create multiple setting configurations and assign which one a site uses in the IIS ISAPI filters settings. Depending on how you run your connector you might already have multiple configs.
I then configured my server in CFB on port 80 instead of the Tomcat port, and instead of setting up virtual servers I have found I can use Set URL Prefix (right click on project in CFB) instead.