Statistical Program Navigator
Reads programs written in the SAS language, statically: it never runs them. Open a folder of programs (.sas files) and you get syntax highlighting, diagnostics, an outline, navigation, a macro expansion preview and a view of which program produces what another reads. It works offline and sends no telemetry.
SAS is a registered trademark of SAS Institute Inc. This extension is independent and not affiliated with or endorsed by SAS Institute Inc.
What it does
- Diagnostics: syntax errors (unclosed quotes, comments,
%MACRO, %DO, DO, SELECT, parentheses), macro variables defined nowhere in the workspace, datasets read before any step writes them, and macros not defined in the workspace (as a hint). Inside macro definitions, structural problems are warnings, since generated code may balance after expansion.
- Outline of steps, macros,
%LET and LIBNAME statements.
- Navigation: go to definition and find references for macros, macro variables (also inside double-quoted strings), datasets (to the producing step, across programs) and formats.
- Hover: a macro's signature and the comment above its
%MACRO; macro variable definitions and constant values; which steps produce and read a dataset, and its file path. Program text in a hover is shown as text: links, images and HTML written in a program are not rendered, so hovering never makes the editor load anything.
- Preview macro expansion (editor title bar): opens the program with constant
%LET, %IF, %DO and calls of workspace macros with constant arguments expanded. Everything that depends on run-time values is kept as written and listed at the top.
- Program lineage (Explorer): programs in run order; under each, the permanent datasets it reads (with the producing program) and writes (with the readers), and its
%INCLUDEs; then every permanent dataset. Click an entry to open the producing step. Export lineage as JSON saves the same as a file you choose.
What it does not do
- It does not run programs, and nothing it shows depends on running them. The diagnostics and the lineage are an aid to reading code: they come from the program text alone, may miss what only a run would show, and you remain responsible for checking your programs.
- It does not change your programs. The only file it writes is the one you choose with Export lineage as JSON. That file holds the folder's location (its
file:// address, which usually contains your user name), the programs' paths, the dataset paths from LIBNAME statements and hashes of step code; check it before you share it.
How it runs
The analysis runs in a language server built to WebAssembly and shipped in the extension, so the same package works on Windows, macOS and Linux, and in the browser editors that support extensions. The server runs inside the editor: on your machine, on the remote host of a remote window (SSH, WSL, dev container), or in the browser tab. The extension reads the .sas files in the open folder (up to the setting statisticalProgramNavigator.project.maxFiles, 5,000; files over 5 MB are skipped; like the editor's own file search, it follows symbolic links named .sas inside the folder) and any program you open, and hands their text to the server, which reads no files itself.
The editor keeps the extension disabled in Restricted Mode, until you trust the folder.
Next to the official SAS extension
The official SAS extension serves the same language. When it is installed and enabled, this extension leaves the outline and the semantic colouring to it, so neither appears twice, and adds its diagnostics (source program-navigator), hover, navigation, the macro expansion preview and the Program lineage view. Which of the two grammars colours the file is up to the editor.
Privacy
The extension collects no telemetry and makes no network request: it does not send usage, file names, paths or program text anywhere. It reads the .sas files in the open folder and any program you open, and passes them to a language server that runs inside the editor (on your machine, on the remote host of a remote window, or in the browser tab); it writes a file only when you choose Export lineage as JSON. Send feedback opens your browser or email program only when you choose one of its two places. In a virtual workspace (for example a repository opened in a browser editor), the editor fetches the folder's files from where they are kept when the extension reads them.
Send feedback
Run Statistical Program Navigator: Send feedback from the Command Palette. It offers two places and opens the one you choose: the public feedback repository in your browser, or a new email in your email program. The extension adds nothing to it and sends nothing itself.
Licence
Apache License 2.0 (LICENSE). Third-party code bundled in the extension and its licences are listed in NOTICE and dist/THIRD_PARTY.txt (the npm packages, with the full licence texts) and in NOTICE-legacy (the Rust crates linked into the WebAssembly language server, with their licence files).