Copy link to clipboard
I've connected to a remote server and can run a project in debug, but when it gets to a breakpoint in a .cfm file, it always has the error 'Source not found.' I have a feeling my 'Server Mappings' are incorrect, but I'm not sure how to fix them. Does anyone have an example of a correctly setup mapping? Our development and remote paths are on different drive letters, I'm wondering if that confuses it. I don't have anything for 'Virtual Host Settings', do I need to?
I've tried several variations for mappings, including:
Local Path: F:\workspace\appname Remote Path: G:\dir1\appname URL: host/dir1/appname
Local Path: \\hostname\G\dir1\appname Remote Path: G:\dir1\appname URL: http://host/dir1/appname
Here's the Eclipse error from the workspace .log file in .metadata:
!MESSAGE Error logged from Debug Core: !STACK 0 java.lang.NullPointerException at com.adobe.rds.client.eclipse.debugger.core.launching.CFMLSourceLookupParticipant.getSourceName(CFMLSourceLookupParticipant.java:114) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupParticipant.findSourceElements(AbstractSourceLookupParticipant.java:57) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector$SourceLookupQuery.run(AbstractSourceLookupDirector.java:139) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector.doSourceLookup(AbstractSourceLookupDirector.java:478) at org.eclipse.debug.core.sourcelookup.AbstractSourceLookupDirector.getSourceElement(AbstractSourceLookupDirector.java:720) at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.lookup(SourceLookupFacility.java:353) at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility$SourceLookupJob.run(SourceLookupFacility.java:761) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Copy link to clipboard
Alicia, there's a simple answer (perhaps) and then a longer one (which may benefit you and others who find this thread).
So yep, getting the CFBuilder debugger working right is awfully fiddly. It can be done (I’ve been helping people do it for over a decade), but there are several moving parts.
And yep, one of those is indeed about mapping the local drive folders holding the CF code to run (as CF Builder sees them) to the remote drive folders (as CF itself sees them). In your example, if the F drive is what CFB would see locally, that’s fine. But you show the G drive for the remote. Is that how YOU see the remote folders (via some OS mapping), like how you see it in Windows explorer on your machine where CFBuilder is installed? If so, that is NOT the right path. Instead, you need to know what the drive and folder would be ON THE SERVER where CF is running.
That may be enough to get you going.
If not, there are several resources that address this. Not only about setting up CFBuilder remote debugging in particular but also CF Builder debugging in general (including the many other fiddly bits to get it working):
They may help many, but most folks need more to "get it" all, and I have tried to help over the years.
Most recently I did a presentation back in (yikes) 2010, called “Setting up ColdFusion Builder Step Debugging”. While the CFB interface has changed some since then, most of the tips and techniques from then still apply. Note that since it was very hands-on, I had no slides, but the session was recorded (link is there) and I also offered a PDF of notes to go with the talk (also there): https://www.carehart.org/presentations/#cfb_debugger_setup
And before that, I did a 25-page chapter introducing the CFBuilder debugger feature in the CF9 Web Application Construction Kit book. That was made available online at the time (again, 2009, yikes), and I have it saved on my site at https://www.carehart.org/articles/CFWACK9-debugchapter.pdf. Again, things in CFB have changed even a bit more since then, but it too focused on addressing common challenges and I had a lot more “space” there to explain things, so even as old as it is it may be valuable. (There was never anyplace else that discussed the CFBuilder debugger in so much detail.)
I should add that I would be remiss not to mention also that anyone seeing this who has the FusionReactor monitor (for CF and Java) in its Ultimate edition should know that it also offers its own implementation of a step debugger. It foregoes the need to use CFBuilder, the CF RDS feature, and many of the other “fiddly bits” of getting step debugging working in CFBuilder.
But again, it can be done (using CFBuilder’s step debugger), and of course it’s free.
That said, if it’s of help, I will say that I also can help you directly (remotely, via screenshare) in the form of a consulting session, to get any of this working, where I suspect we could have you doing step debugging within a half hour (since I know of all the various moving parts that need to be setup correctly). For more on my services, including rates, approach, and satisfaction guarantee, see carehart.org/consulting. But if you want to simply try on your own, I hope the above (especially the first point) may help. And of course I and others will be here to answer questions.
Finally, some readers finding this thread in the future may wonder if I might do an updated version of my resources on using the CFB debugger (whether a new talk or a blog post or series), especially for the sake of those getting started with it, and since the UI for moving around in the CF docs leaves a lot to be desired, even if one may have come across the pages above via their own google searching. The challenge for me is that I have lots of topics that I’d like to reprise, and only so much time to work on things, especially substantial topics like this. 🙂
Let us know how you go, Alicia.
Copy link to clipboard
Thank you for the links to more detailed information, I appreciate it. Unfortunately I still could not get it to work remotely. The G: drive is where the ColdFusion server (not Builder) finds the files. I also tried mapping my own G: drive to the F: drive so that the local and server path were identical, but still no luck.
Luckily I was able to install Builder on the server since this is not a production server, and just run it from there.
I am also wondering if it might be because I typically use 'Create links in workspace' in Eclipse, but even when I copied the files locally into my workspace, it still didn't work.
Anyway, thank you again for your response. I am going to submit a bug that Builder should catch that exception and ideally give more information about what is missing.
Copy link to clipboard
Understood, and glad you got things working via the workaround (of not doing "remote" debugging after all), but I will say that it's very likely not any sort of "bug" but just a misconfiguration. I shared those several resources, in which I address some of the very common mistakes one can easily make.
Still, I realize you need to move on, and there is always the possibility that you have hit some new bug, and perhaps Adobe will respond to the bug report. Again, for future readers of this thread who may feel they hit the "same problem", the resources above (or my direct assistance) should be able to get you going, if you don't have the freedom to install CFB on the server as Alicia did.
And FWIW, it's really just as well to do such debugging (in CFB) from the server where CF is installed (by installing CFB there, if possible), so that you need not open up the RDS communications that this debugger must use (by default in CF2016 and above it would be done via the built-in web server, which is at least on a non-standard port 8500, which most firewalls would block by default).
That said, that fact that one does still need to enable RDS to use the CFB debugger is another reason folks interested in debugging a CF server (versus their local development or test machine) may want to seriously consider the step debugger feature in FusionReactor Ultimate. I have done a 20 min youtube video introducing it, for those interested.