microsoft / microsoft/vscode-python-debugger

Terminal doesn't use custom bash profile when debugging

Aperta
#521 14 commenti 13 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug needs PR
Lingua principale
TypeScript
Stelle
181
Fork
126
Merge medio
2g 3h
PR unite (30g)
3

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia riproducendo il problema con le impostazioni terminal.integrated.shellArgs.osx elencate, un --rcfile personalizzato e l'avvio del debug Python tramite F5. Confronta l'ambiente del terminale integrato con l'ambiente dopo l'avvio del debug. Il lavoro è completato quando il processo avviato dal debug mantiene il profilo personalizzato configurato invece di caricare ~/.bashrc.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
bash, python, typescript
Ambito
cli, devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.