Skip to main content
Inspiring
July 3, 2023
Question

VS Code(Code Builder): Selected file is not in the document root of the server.

  • July 3, 2023
  • 1 reply
  • 1588 views

Hi,

 

I'm using Coldfusion 2023. I use VS Code (ColdFusion Builder extension). I'm getting this error continuously ,

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 ).

 

Please help.

    This topic has been closed for replies.

    1 reply

    RaviShankar Chagnur
    Adobe Employee
    Adobe Employee
    July 7, 2023

    Hello Vishnu,

     

    Please refer to below documet under section "Add a ColdFusion project " it will give option to create linked Folder

    https://helpx.adobe.com/in/coldfusion/coldfusion-builder-extension-for-visual-studio-code/get-started-coldfusion-builder-extension-visual-studio-code.html

     

    Thanks

    Ravi

     

    Charlie Arehart
    Community Expert
    Community Expert
    July 7, 2023

    Honestly, Ravi, the error message quoted by Vishnu offers more detail on the process (of adding a linked folder) than does that terse step (mentioning it only in passing) on that doc page. 🙂 

     

    I've hit this issue before as well, and even though I've long helped people overcome issues with both the old (Eclipse) and new (vscode) versions of cfb, this challenge has often not been easily solved.

     

    Can you clarify (for example) what's worked for you when the Workspace is in one folder, the project in another with the cfml code, and that code's NOT stored within the cfusion wwwroot?

     

    The latter seems to be where this can happen, and I daresay it's is how MOST people work, if they're trying to approximate a production server setup which is using a  web server like iis or apache.

     

    Sometimes I get it working (able to "run" the page/launch browsing of it from within cfb) and sometimes not. And of course, if you can't get it to "run", then you can't get it to debug, runbthe security code analyzer, and more.  So it's quite a blocker when it happens. Maybe some additional diagnostics or how to diagnose the problem would help. 

     

    Thanks. 

    /Charlie (troubleshooter, carehart. org)