PlantUML extension for Visual Studio Code on Windows only working with sequence diagrams PlantUML extension for Visual Studio Code on Windows only working with sequence diagrams windows windows

PlantUML extension for Visual Studio Code on Windows only working with sequence diagrams


The GRAPHVIZ_DOT environment variable is specified in File > Preferences > Settings > Plantuml: Command Args. Click on the link to "Edit in settings.json".

Settings dialog

settings.json

Additionally the VSCode PlantUML extension doesn't appear to include the graphviz "dot.exe" executable, so this needs to be downloaded and installed (e.g. via chocolatey OR download and unzip from https://graphviz.gitlab.io/_pages/Download/Download_windows.html)

Following this, update the path and save.

{    "plantuml.commandArgs": [        "-DGRAPHVIZ_DOT=D:\\Tools\\graphviz-2.38\\release\\bin\\dot.exe",    ]}

Also see https://github.com/qjebbs/vscode-plantuml/issues/94


The prerequisite of PlantUML is Java and Graphviz (https://plantuml.com/starting)

You need these things to run PlantUML: Java Graphviz (optional if youonly need sequence diagrams and activity (beta) diagrams)

, in Windows machine, we can download and extract the Graphviz and then put it in the user path.


This is how I managed to fix the graphviz dot: null issue:

From VSC: Goto EXTENSIONS: MARKETPLACE ( you can find the option on the left side)

enter image description here

Select the graphviz extension that you have installed e.g. @ext:tintinweb.graphviz-interactive-preview

Click the Settings

Graphviz-interactive-preview: Render Lock  (Uncheck this one)Graphviz-interactive-preview: Render Lock Additional Timeout: -1

If VSC is on Windows, then create a variable pointing to the location where dot.exe of graphviz has been installed.

enter image description here