Fix Cannot Specify Dot Executable Issue in VisualStudio Code PlantUML

«  XQuartz in M1 Mac
gRPC Memo  »

There is an issue when I open PlantUML with VSCode. It seems only happen when we install graphviz from brew. The warning is like:

Dot Executable: /opt/local/bin/dot File does not exist
Cannot find Graphviz. You should try
...

Solution

add ⬇️ to settings.json in VSCode

"plantuml.commandArgs": [
    "-DGRAPHVIZ_DOT="{PATH_TO_GRAPHVIZ}/bin/dot",
]

in my case, the path is /opt/homebrew/Cellar/graphviz/3.0.0/bin/dot.

If don’t know where it is, we could check it by brew info graphviz.

Then preview the PlantUML diagram again, the problem is solved.

References

Published on 02 May 2022 Find me on Facebook, Twitter!

«  XQuartz in M1 Mac
gRPC Memo  »

Comments

    Join the discussion for this article at here . Our comments is using Github Issues. All of posted comments will display at this page instantly.