Skip to content

Commit 23f280c

Browse files
authored
fix: VSCode garbled REPL (#298)
1 parent 7659ef5 commit 23f280c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,21 @@
99
// Allow X11 apps to run inside the container
1010
"DISPLAY": "${localEnv:DISPLAY}",
1111
// Do the equivalent of "activate" the venv so we don't have to "uv run" everything
12+
"VIRTUAL_ENV": "/workspaces/${localWorkspaceFolderBasename}/.venv",
1213
"PATH": "/workspaces/${localWorkspaceFolderBasename}/.venv/bin:${containerEnv:PATH}"
1314
},
1415
"customizations": {
1516
"vscode": {
1617
// Set *default* container specific settings.json values on container create.
1718
"settings": {
19+
// Use the container's python by default
1820
"python.defaultInterpreterPath": "/workspaces/${localWorkspaceFolderBasename}/.venv/bin/python",
21+
// Don't activate the venv as it is already in the PATH
1922
"python.terminal.activateEnvInCurrentTerminal": false,
2023
"python.terminal.activateEnvironment": false,
21-
"remote.autoForwardPorts": false
24+
// Workaround to prevent garbled python REPL in the terminal
25+
// https://github.com/microsoft/vscode-python/issues/25505
26+
"python.terminal.shellIntegration.enabled": false
2227
},
2328
// Add the IDs of extensions you want installed when the container is created.
2429
"extensions": [
@@ -33,6 +38,8 @@
3338
}
3439
},
3540
// Create the config folder for the bash-config feature and uv cache
41+
// NOTE: The uv cache can get large, DLS users should read
42+
// https://dev-guide.diamond.ac.uk/linux-user-environment/how-tos/disk-quota-troubleshooting
3643
"initializeCommand": "mkdir -p ${localEnv:HOME}/.config/terminal-config ${localEnv:HOME}/.cache/uv",
3744
"runArgs": [
3845
// Allow the container to access the host X11 display and EPICS CA

0 commit comments

Comments
 (0)