Auto save on debug/run

Menu > File > Preferences > Task: Save Before Run In theory this should be all we need, but when set to ‘always’ it doesn’t work for running Python code. Hopefully this will get fixed sometime… Instead we have to do this for now: Files: Auto Save = onFocusChange Files: Auto Save Workplace Files Only […]

Read More

.1 Installing Visual Studio Code

Setup for VS Code Python programming Install Python for Windows Reboot windows (so the correct environmental variables are picked up for python by VS code – we found was needed after adding / updating Python to a new version). In VS Code, add the “Python extension for Visual Studio Code”, just named “Python”. Ensure VS Code […]

Read More

.2 Making VS Code work the way we like

VS Code Options Our general settings for VS Code – see here Python programming specific settings Use CTRL+SHIFT+P and then enter “Open User Settings (JSON)” to open the raw json file. Check it has the following: File > Preferences > Settings “editor.trimAutoWhitespace”: false – stops VSCode auto removing indent of blank lines

Read More

.3 Using Visual Studio Code

Resources https://code.visualstudio.com/docs/python/python-tutorial Creating a new Python project VS Code menu > File > Open Folder Open a folder that will be your workspace (you can just open an empty folder you’ve created). Turn off Dropbox if your folder is within Dropbox (causes file access issues for us at times) Now create a virtual environment for […]

Read More