-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
Before you can begin optimizing your code, you'll need to install both the VS Code extension and its supporting Python backend. The installation process is straightforward but requires attention to a few key details:
-
VS Code Extension Installation:
Open the Extensions view in VS Code (Ctrl+Shift+XorCmd+Shift+Xon Mac) and search for "EcoOptimizers." Click the Install button and wait for the process to complete. The extension will automatically activate the next time you open a Python file or restart VS Code. -
Python Backend Setup:
Our analysis engine requires a local Python environment (version 3.10 or higher) with the ecooptimizer package installed. Open your terminal and execute:pip install ecooptimizer eco-ext
This will install the necessary dependencies and start the backend server on the default port (8000). Keep this server running during your development sessions for full functionality. The extension will gracefully degrade to cached results if the server becomes unavailable, ensuring you can still access previously detected code smells.
Upon first launch, EcoOptimizers needs to understand which parts of your project to analyze. The configuration process is simple but crucial:
When you open either the Code Smells or Carbon Metrics panel for the first time, you'll see a prominent "Configure Workspace" button. Clicking this will present a file dialog where you can select the root directory of your Python project. This becomes the scope boundary for all subsequent analyses - only files within this directory (and its subdirectories) will be scanned for code smells.

You can later modify this configuration through the three-dot menu in the Code Smells panel, which includes options to reset the workspace or clear all cached detection results. This is particularly useful when your project structure changes significantly.

UI Guide →