Visual diff viewer for PLECS circuit files (.plecs) across Git commits inside VS Code.
- Compare a PLECS file between two commits, or between a commit and your working copy.
- Open from status bar command (
PLECS Diff) or from file context menu. - View circuit-level changes and navigate subsystem differences in the panel.
The extension uses colors and line styles to indicate different types of changes:
- 🟢 Green Solid: Newly added component.
- 🔴 Red Solid: Removed component.
- 🟡 Yellow/Khaki Solid: Parameter changed inside a component (e.g., resistance, voltage) without component addition/removal.
- 🟣 Purple Dashed: Component position changed.
- Ghost Component (Faded dashed): Represents the previous location of the moved component.
- Position Change Line (Dashed): Shows the path between the old and new positions.
- 🔘 Highlight Ring (Large yellow dashed circle): Focuses on the currently selected change from the left diff list.
- VS Code
1.85.0or newer - A Git repository containing
.plecsfiles - PLECS files committed in Git history for commit-to-commit comparisons
Use this method when internet access is restricted or Marketplace install is unavailable.
Pre-compiled binary can be downloaded in the release tab.
- Open Extensions view.
- Select the
...menu. - Choose
Install from VSIX.... - Select the VSIX file from
build_extension/.
You can see the detailed step in this link: https://developer.analog.com/docs/codefusion-studio/1.1.0/user-guide/installation/install-extensions/
code --install-extension build_extension/<generated-file>.vsixExample:
code --install-extension build_extension/plecs-diff-viewer-0.2.0.vsix./build.shOptional: set a temporary package version for that build only:
./build.sh --version 0.2.0- Open a workspace that contains
.plecsfiles in a Git repository. - Click
PLECS Diffin the VS Code status bar. - Select the target
.plecsfile (if prompted). - In the panel, choose the
OLDandNEWcommits (orWorking Copy). - Click compare to view the visual diff.
- In Explorer, right-click a
.plecsfile. - Select
PLECS Diff: Compare File Between Commits. - Select
OLDandNEWversions in the panel.
./build.shBuild output:
- VSIX file is generated under
build_extension/. - The package includes this
README.mdfile and uses it as the extension readme.
Install dependencies:
npm installTip: To test the extension directly in VS Code, simply press F5. This automatically runs the npm: build task and launches a new Extension Development Host window.
Build extension bundle (manual):
npm run buildWatch mode:
npm run watchFailed to get git log: make sure the workspace root is a Git repository and the file is tracked.Error loading diff: verify the selected file exists in the selected commit and is a valid PLECS file.- No
.plecsfiles found: open the correct workspace folder and check file extension.
