Question
· 5 hr ago

VS Code Find in Routines

Hello 

I'm using from visual code. My routines are server-side files. If I try to search patterns in files (e.g find all routines containing the string "version=3") , the search runs but didn't find anything. If I do the same search from the management portal, it finds all routines including this pattern with a good performance.

regards Matthias

Product version: IRIS 2025.2
Discussion (5)2
Log in or sign up to continue

The difficulty you are experiencing in searching server-side files using VS Code, compared to the Management Portal's search functionality, may arise because VS Code's default search only works for local files by design, and not automatically for server-side code stored on remote servers. However, there are ways to configure VS Code to access and search server-side routines effectively:

  1. Enable Server-Side Editing: VS Code's ObjectScript extension supports server-side editing, allowing users to work directly with routines/files on the server. Follow the instructions to set up server-side editing, which also enables browsing and editing server files directly from within VS Code. Detailed setup steps can be found here [1][2].

  2. Use Advanced Server-Side Search: For users of InterSystems IRIS 2023.x or later, the ObjectScript extension offers fast, asynchronous server-side search functionality when the proposed API is enabled. Ensure that you configure your VS Code environment properly as described in the README of the "InterSystems ObjectScript" extension documentation. This enables server-side search capabilities for searching routines/files directly on the server [3].

  3. Search Configuration Tips:

    • If unsure how to include/exclude specific folders during searches, you can configure search filters directly within VS Code's interface (e.g., in the "files to include" input box in the Search panel) [4].
    • You might need to follow specific steps to enable server-side search across all folders by ensuring proposed APIs are enabled in your workspace settings.

By incorporating these strategies and ensuring the ObjectScript extension is properly set up, you should achieve functionality similar to Management Portal searches. Let me know if further clarification is needed!

Sources:

Yes. Have installed vscode-objectscript-3.2.1-beta.5. In my argv.json inserted "enable-proposed-api": ["intersystems-community.vscode-objectscript"]. In the README is a hint to control that the ObjectScript Output Window prints "intersystems-community.vscode-objectscript version X.Y.Z-beta.1 activating with proposed APIs available. ".  My Output Window is empty.