Copy link to clipboard
Copied
I’ve run into an issue in the Adobe ColdFusion Builder extension for Visual Studio Code. I’m developing a ColdBox application using VS Code as my IDE. I’ve encountered a problem where VS Code fails to navigate to function definitions or references for objects created with ColdBox’s WireBox getInstance() and inject methods. This functionality works fine for objects instantiated with the new operator, but not for those managed by WireBox(ColdBox's Dependency Injection Module).
Has anyone else encountered this issue? Are there any tools, extensions, or settings adjustments you would recommend to improve code navigation for WireBox-injected objects?
Does VSCode extension has a manual mapping option like the old Eclipse-based CFBuilder used to ?
I’m currently using ColdFusion (2021), ColdBox (coldbox-7.2), and the latest Adobe ColdFusion Builder extension for VS Code. Any advice or suggestions would be greatly appreciated. Thank you in advance!
Copy link to clipboard
Copied
While I can't speak to wirebox specifics, I'll say that the CFBuilder vscode extension does require several characteristics be configured for many of its more advanced features to work:
While it can seem overwhelming, all that's needed for the code insight features in cfb to find cfc's, methods etc, in the way that those would be served via cf itself (leveraging things like cf mappings, custom tag paths, etc). That's a large part of what makes it an IDE vs just a code editor.
Finally, are you saying things worked for you in some other ode, or using some other vscode extension? Knowing that may provide clues as to why it may or may not work in your current setup.
Copy link to clipboard
Copied
Thank you for the detailed response.
I can confirm that:
Following these guidelines, I've noticed that the code insight features work perfectly for objects created with ColdFusion's 'new' operator or createObject() function. This indicates to me that the basic setup and connectivity are correctly configured, as the extension successfully navigates to function definitions and references in these cases.
However, the challenge arises specifically with objects instantiated via ColdBox's getInstance() method from the WireBox dependency injection module.
This discrepancy in code navigation capability between standard ColdFusion object creation methods and ColdBox's WireBox DI mechanism is at the core of my issue. It appears the extension might not fully recognize or interpret WireBox's runtime object instantiation processes for code navigation purposes.
Given this context, are there any additional configurations, tools, or extensions you might recommend that could help improve code navigation for WireBox-injected objects? Perhaps there's a way to manually map or hint to the extension about these WireBox-managed components?
Again, thank you for your assistance.