Trouble with Code Navigation for WireBox-Injected Objects in VS Code

Hi, I’m a beginner with ColdFusion and ColdBox, and 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.

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?

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!

This has always been an issue for dynamic languages like ColdFusion when it comes to IDEs. I don’t know if Adobe’s VSCode extension has a manual mapping option like their old Eclipse-based CFBuilder used to, but that used to be the only way to make it work. It really boils down to the fact that the IDE plugin has no idea what getInstance( "foo" ) is going to resolve to at runtime without knowing the inner workings of WireBox and what mappings will exist at runtime, which takes into account all registered modules!

I’d ask this question to Adobe. I’ve never used their IDE plugin to be honest so I’m not sure what options they have for manually mapping CFCs.

1 Like