Go Concurrency VisualizerA VS Code extension for seeing how goroutines and channels connect in Go source. Open a graph for one file or a whole module, then click a node to jump to the corresponding line. Potential problems appear in the Problems panel. This is static analysis: it reads your source without running your program. The graph includes function scopes, goroutine launches, channels, selects, WaitGroups, and mutexes. Getting startedYou need VS Code 1.85 or later and Go 1.21 or later on your PATH. Open a trusted folder containing a Go module. For SSH, WSL, or containers, install Go on the remote host as well.
Try this in a
The graph shows Run Concurrency Visualizer: Show Workspace Graph (all packages) to combine the packages in the first workspace folder. For a workspace with several root folders, only the first is analyzed. WarningsThe extension checks for:
These are prompts to inspect the code, not confirmed bugs. For example, a short-lived goroutine may need no cancellation, a select may intentionally wait, and two closes in mutually exclusive branches may be safe. A WaitGroup does not by itself limit the number of concurrent goroutines. What it missesAnalysis is based mainly on syntax. Channel, WaitGroup, and mutex names are
tracked within each function; shadowing, aliases, struct fields, and values
passed as parameters are not fully resolved. Goroutine function literals are
walked, but a named call such as Loop-variable warnings are not adjusted to your module's Go language version. CodeLens placement uses a lightweight scan of function bodies and can be inaccurate around braces in comments or strings. Files with package errors may produce incomplete graphs. Analysis reads saved files. Saving updates CodeLens and Problems; run the graph
command again to refresh an open graph. Browser-only, virtual, and untrusted
workspaces are not supported. This extension does not replace Troubleshooting
Privacy and platform supportThe analyzer is bundled for macOS, Linux, and Windows on x64 and ARM64. Source analysis runs locally. The extension sends no telemetry and makes no API calls. Go's package loader may download missing module dependencies; cached dependencies allow offline use. FeedbackReport a bug with your Go version, operating system, and a small example that reproduces it. The source code is available under the MIT license. |