Skip to content

envFile config option does not work with debugpy #51168

Closed as not planned
Closed as not planned

Description

@nightblure

Reproduction steps

my configuration (debug.json):

// https://zed.dev/docs/languages/python#debug-a-flask-app
[
  {
    "label": "api (run)",
    "type": "node-terminal",
    "adapter": "Debugpy",
    "request": "launch",
    "module": "flask",
    "args": [
      "api",
      "--num_workers=1",
      "--timeout=600",
      "--app_port=8081",
      "--probes_port=8082",
    ],
    // "cwd": "$ZED_WORKTREE_ROOT",
    // "env": {
    //   "FLASK_DEBUG": "1",
    //   "FLASK_ENV": "development",
    //   "FLASK_APP": "run:app",
    // },
    "envFile": "$ZED_WORKTREE_ROOT/.env",
    // "envFile": "${ZED_WORKTREE_ROOT}/.env",
    "autoReload": {
      "enable": true,
    },
    "jinja": true,
    "justMyCode": false,
    "subProcess": true,
  },
]

ill try different options but its cant run

 * Tip: There are .env or .flaskenv files present. Do "pip install python-dotenv" to use them.
Error: Failed to find Flask application or factory in module 'app'. Use 'app:name' to specify one.

Usage: python -m flask [OPTIONS] COMMAND [ARGS]...
Try 'python -m flask --help' for help.

Error: No such command 'api'.

Current vs. Expected behavior

current behaviour: envFile option not working with debugpy
expected behaviour: envFile option working with debugpy

Zed version and system specs

Zed 0.226.5
07dae3b

0.226.5+stable.197.07dae3b7020b0ad79ed91e18c750a16952432866

macos tahoe 26.3, M1 Pro 16GB

Attach Zed log file

Zed.log

Relevant Zed settings

settings.json

Relevant Keymap

keymap.json

(for AI issues) Model provider details

No response

If you are using WSL on Windows, what flavor of Linux are you using?

None

Activity

  1. added theissue type on Mar 10, 2026
  2. added
    state:needs triagetriage is not complete: no `area:*` label, or no `severity:*`/`reach:*` for Bugs/Crashes
    on Mar 10, 2026
  3. changed the title [-]envFile settings does not work with debugpy[/-] [+]envFile config option does not work with debugpy[/+] on Mar 10, 2026
  4. added
    state:needs reproNeeds reproduction steps and/or someone to reproduce
    reach:many usersBugs that happen for at least a third of the users across all platforms and kinds of usage
    severity:S3Papercuts, minor issues with a clear non-tedious workaround, cosmetic bugs
    reach:some usersBugs that happen for less than one-third of users, special configurations, rare circumstances, etc
    and removed
    state:needs triagetriage is not complete: no `area:*` label, or no `severity:*`/`reach:*` for Bugs/Crashes
    reach:many usersBugs that happen for at least a third of the users across all platforms and kinds of usage
    on Mar 10, 2026
  5. ai-mountain commented on Mar 10, 2026

    @ai-mountain

    @nightblure I am interested in this Repo. Can I work on this issue and make a PR?

  6. nightblure commented on Mar 10, 2026

    @nightblure
    Author

    add info: with type "python" got same behaviour

    I came up with a workaround, and it works thanks to running it through a Python file, inside which I read the envs and run what I need. If anyone is interested and has encountered this, write here, and I'll show you my work

  7. ai-mountain commented on Mar 10, 2026

    @ai-mountain

    Nice work. Thanks for it,

  8. github-actions commented on Jun 12, 2026

    @github-actions

    Zed development moves fast and a significant number of bugs become outdated. If you can reproduce this bug on the latest stable Zed, please let us know by leaving a comment with the Zed version, it helps us focus on the right issues. If the bug doesn't appear for you anymore, feel free to close the issue yourself; otherwise, the bot will close it in a couple of weeks. But even after it's closed by the bot, you can leave a comment with the version where the bug is reproducible and we'll reopen the issue. (This bot will only ask about this issue once) Thanks!

  9. github-actions commented on Jul 10, 2026

    @github-actions

    This issue was closed due to inactivity. If you're still experiencing this problem, please leave a comment with your Zed version so that we can reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:debugger/dap/debugpyDebugpy debug adapter protocol serverreach:some usersBugs that happen for less than one-third of users, special configurations, rare circumstances, etcseverity:S3Papercuts, minor issues with a clear non-tedious workaround, cosmetic bugsstaleLabel used by `stale` actionstate:needs reproNeeds reproduction steps and/or someone to reproduce

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions