microsoft / microsoft/vscode-python-debugger

Terminal doesn't use custom bash profile when debugging

未关闭
#521 14 条评论 13 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

bug needs PR
主要语言
TypeScript
星标
181
派生
126
平均合并
2 天 3 小时
30 天内合并 PR
3

描述

redirected here from closed issue https://github.com/microsoft/vscode/issues/80434
The bug appeared after one of few last updates.
When integrated terminal starts it uses custom profile (as expected),
but after python script is started it loads profile from ~/.bashrc

In my settings.json I have the following settings:

"terminal.integrated.shellArgs.osx": [
   "--rcfile", "/Volumes/DISK/projs/TechStuff/settings/profile"
],
"terminal.integrated.env.osx": {"HISTFILE":"/dev/null"},
"terminal.integrated.setLocaleVariables": false,

Environment data

Version: 1.38.0
Commit: 3db7e09f3b61f915d03bbfa58e258d6eee843f35
Date: 2019-09-03T21:47:00.464Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Darwin x64 17.7.0

Expected behaviour

using custom profile (environment)

Actual behaviour

using standard profile (environment), after starting python script

Steps to reproduce:

  1. Assign custom profile to integrated terminal settings.(and restart maybe)
  2. Open page(tab) with any python script and open integrated terminal.
    (You can put string like echo 'bashrc loaded' in profile file to see it loads)
  3. Check profile - it is cutom.
  4. Debug python script (F5 or Debug -> Start Debugging) - it loads bashrc profile instead of custom
  5. Check which profile is loaded (can use printenv command if you set different env. variables or check echo print as mentioned above) - standard profile loaded.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先,使用列出的 terminal.integrated.shellArgs.osx 设置、自定义的 --rcfile,以及通过 F5 启动 Python 调试来复现该问题。比较集成终端中的环境与调试启动后的环境。当调试启动的进程保留已配置的自定义配置文件,而不是加载 ~/.bashrc 时,即表示完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
bash, python, typescript
领域
cli, devtools
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。