Gerhard Bräunlich
February 2025
🐧 | Visual Studio Code on Linux |
🪟 | Visual Studio Code on Windows |
🍏 | Visual Studio Code on macOS |
By default, VSCode collects telemetry data
Disable: Settings > Search “telementry” > Telemetry: Enable Telemetry
{"telemetry.telemetryLevel": "off"}
Unofficial (FOSS) alternative: vscodium.
Interesting alternative: Zed
Ctrl+P
/
⌘+P
Start char | Effect | |
---|---|---|
Open file | ![]() |
|
> |
Command palette | ![]() |
@ |
Symbol lookup | ![]() |
# |
Symbol lookup | ![]() |
: |
Jump to line | ![]() |
Via command palette: Ctrl+⇧+P
/ ⌘+⇧+P
or
F1
Or directly: Ctrl+,
/ ⌘+,
Config path (share / backup config):
$HOME/.config/Code/User/settings.json # 🐧
%APPDATA%\Code\User\settings.json # 🪟
$HOME/Library/Application Support/Code/User/settings.json # 🍏
Per project config:
.vscode/settings.json
Ctrl+P
/
⌘+P
) -> ext install <extension-id>
->
Enterext install ms-python.python
Scans for
Example:
def prepare_config(base_config={}, **kwargs):
base_config.update(kwargs)
return base_config
print(prepare_config(a=1, b=2))
print(prepare_config(c=3))
Output 😲:
{'a': 1, 'b': 2}
{'a': 1, 'b': 2, 'c': 3}
❱ ruff check example.py
example.py:1:25: B006 Do not use mutable data structures for argument defaults
|
1 | def make_args(base_args={}, **kwargs):
| ^^ B006
2 | base_args.update(kwargs)
3 | return base_args
|
= help: Replace with `None`; initialize within function
Found 1 error.
No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).
Ships with: ruff
Traceback (most recent call last):
File "/tmp/example.py", line 2, in <module>
d.get("a") + d.get("B")
~~~~~~~~~~~^~~~~~~~~~~~
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
❱ mypy example.py
example.py:2: error: Unsupported operand types for + ("int" and "None") [operator]
example.py:2: error: Unsupported operand types for + ("None" and "int") [operator]
example.py:2: error: Unsupported left operand type for + ("None") [operator]
example.py:2: note: Both left and right operands are unions
Found 3 errors in 1 file (checked 1 source file)
A type checker also checks if your typehints are consistent:
example.py:6: error: Incompatible return value type (got "float", expected "int") [return-value]
Ships with: mypy
Alternatives: pyright, …
Requires: Setup of SSH keys
Euler: Use the Euler-tunnel to prevent jams on login nodes
Requires: docker
Remote ssh: Grab a release from here
Remote container: Grab a release from here
VS Code Marketplace: https://marketplace.visualstudio.com
VS Codium repository: https://open-vsx.org
Slides:
📊 Slides: ✨ Live version / 📖 Source