OpenFOAM Debug Mode
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