Skip to content

Debugger does not work until a Python file is opened #1098

@patrys

Description

@patrys

Environment data

  • VS Code version: 1.22.0-insider
  • Extension version (available under the Extensions sidebar): 2018.2.1
  • OS and version: macOS High Sierra
  • Python version (& distribution if applicable, e.g. Anaconda): Homebrew Python 3.6.4
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): direnv with layout python3
  • Relevant/affected Python packages and their versions: n/a

Actual behavior

I have a project that is half Python/Django and half React. I use VSCode to run/debug the backend part while mostly editing the code for the front-end part. If I attempt to use the debugger before opening a Python file it fails to start.

Expected behavior

Django starts.

Steps to reproduce:

  1. Restart VSCode

  2. Open a TypeScript or JavaScrip file without opening any Python files

  3. Notice that there is no Python interpreter shown in the status bar

  4. Switch to debugger and run the Django configuration

  5. The server fails to start claiming being unable to find the Python executable

    Failed to launch the Python Process, please validate the path '${workspaceFolder}/.direnv/python-3.6.4/bin/python'

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

Python is not listed under Output.

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:1333
   ERR spawn react-native ENOENT: Error: spawn react-native ENOENT
	at exports._errnoException (util.js:1050:11)
	at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
	at onErrorNT (internal/child_process.js:367:16)
	at _combinedTickCallback (internal/process/next_tick.js:80:11)
	at process._tickCallback (internal/process/next_tick.js:104:9)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-debuggingbugIssue identified by VS Code Team member as probable bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions