Visual Studio Code
SpaceSharp comes with a small extension for Visual Studio Code, so a folder you are working in can be scanned without leaving the editor.
Installing it
Open Settings › General, find Visual Studio Code, and click Install the extension. SpaceSharp hands the extension to VS Code through VS Code's own command line. Nothing is downloaded: the extension is inside the app, and it is the version that belongs to your SpaceSharp. Once it is in, the row says Installed, with Install again beside it in case you removed the extension in VS Code. After an update of SpaceSharp the button is back, to update the extension too.
If SpaceSharp says VS Code was not found, VS Code is either not installed or its code command is not on the PATH. In VS Code, Shell Command: Install 'code' command in PATH from the Command Palette fixes the second on macOS; on Windows the installer adds it unless that was unchecked.
What it adds
- Saved scans open in the editor. Click a
.sharpmapfile (or.sscanfrom before 3.0) in VS Code and it opens as a table: the scanned drive or folder with its size, file count and scan time, and under it the folders and files, largest first, each with its share of the folder it is in, its size, its file count and when it last changed. Click a folder to open it; a folder with many items lists the largest 200 and offers the rest. Open in SpaceSharp at the top shows the same scan as a map. - Scan in SpaceSharp on a folder's menu in VS Code's Explorer scans that folder.
- SpaceSharp: Scan the Workspace Folder in the Command Palette scans the folder you have open; with several folders open it asks which.
Reading a saved scan happens inside VS Code and needs nothing else. The other two start SpaceSharp with the path, the same as the command line does.
Good to know
- The extension sends nothing anywhere. It reads the scan file you open and nothing else.
- It finds the program by itself: SpaceSharp notes its own path beside its settings when you install the extension. If you move SpaceSharp, start it once and install the extension again, or set the path in VS Code under
spacesharp.executablePath. - Folders in a remote or virtual workspace (SSH, WSL, a container) cannot be scanned: SpaceSharp reads folders on this computer only.
- The extension's own texts are in English.
- To remove it, uninstall SpaceSharp in VS Code's Extensions view.