当我从VSCode运行Python调试器时,它会使用以下命令充斥我的bash历史记录:
cd /home/maumau/workspace/projects/spreadsheetapi ; env "FLASK_APP=/home/maumau/workspace/projects/spreadsheetapi/app.py" "PYTHONIOENCODING=UTF-8" "PYTHONUNBUFFERED=1" /home/maumau/.virtualenvs/spreadsheetapi/bin/python /home/maumau/.vscode/extensions/ms-python.python-2018.9.2/pythonFiles/experimental/ptvsd_launcher.py 45567 /home/maumau/.virtualenvs/spreadsheetapi/bin/flask run --no-debugger --no-reload
如何避免这种情况?
在问这个问题之前,我已经在人的地方搜索了如何防止将命令插入到历史记录中。我已经看到很多人说我应该在命令前使用空格。我的问题不是“如何防止将命令插入bash历史记录”,因为以前的帖子已经回答了这一问题。我的问题是如何使VSCode做到这一点。
答案 0 :(得分:1)
也许这会有所帮助:
"debug.console.historySuggestions"
设置现在可以通过以下方式关闭调试控制台历史记录建议
debug.console.historySuggestions
,默认情况下为true
。
请参见v1.43发行说明:https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_43.md#debugconsolehistorysuggestions-setting