question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with parsing .env values during debugging

See original GitHub issue

Environment data

  • VS Code version: 1.27.2
  • Extension version (available under the Extensions sidebar): 2018.8.0
  • OS and version: Ubuntu 16.04
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.6
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): pipenv

Actual behavior

abcls -l

Expected behavior

abc!23

Steps to reproduce:

  1. In launch.json:
...
        {
            "name": "Python: Application",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/bin/application.py",
            "envFile": "${workspaceFolder}/.env"
        },
...
  1. In .env:
SOME_PASSWORD=abc!23
  1. In application.py:
import os
print(os.environ['SOME_PASSWORD'])

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
DonJayamannecommented, Oct 2, 2018

@GaramNick @PEKTOP please could you both install the insiders build of VS Code from here - https://code.visualstudio.com/insiders/. I believe this issue with (escaping) special characters in the terminal has been resolved.

0reactions
DonJayamannecommented, Nov 2, 2018

Closing this as it’s an upstream issue (caused by a bug in VSCode(

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using and Debugging Environment Variables - Software Verify
How to use environment variables to configure Validator tools, and how to debug them when the use of them doesn't work as expected....
Read more >
Wrong parsing the environment variable
Hi all, I saw some other thread here having a similar problem with the environment variable of the debugging interface of the project...
Read more >
Problem with parsing of environment variables - rclone forum
i am having issues with the parsing of environment variables. in this case, remote-x: does not exist, but rclone will use it.
Read more >
How to resolve JSON Parse Error When Not in Debug Mode?
I have the following code block where I'm passing from my .env, in a string that stores a json with the credentials for...
Read more >
Understanding Docker Build Args, Environment Variables and ...
An overview of ways to set and use variables when building images, starting containers and using docker-compose.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found