OpenFOAM Debug Mode

From CUSF Wiki
Revision as of 22:07, 31 December 2021 by NikLebedenko (talk | contribs) (Created the page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Here are some instructions on how to enable debugging in OpenFOAM for those using Windows Subsystem for Linux (WSL), mostly based on this article and this article by Mustafa Abbas on his Medium page. He has, however, made a couple of omissions / mistakes in his articles, so I have added some corrections here.

Installing Visual Studio Code with Ubuntu support

  • Make sure you have Visual Studio Code (not Visual Studio) installed on your Windows system.
  • Open Visual Studio Code, and click on the Extensions tab (CTRL+SHIFT+X) on the left side of the screen.
  • Download these two extensions by pasting their IDs into the search bar and clicking "Install":
    • ms-vscode.cpptools
    • ms-vscode-remote.remote-wsl
  • You should now be able to run code . in a Ubuntu terminal, and it should open Visual Studio Code within