Skip to content

Starting debug only launches the activation of the conda environment but not the script #2862

Description

Issue Type: Bug

I simply launch VScode, and from there start my debug task. I've run a few debug task earlier today and it worked fine, but after updating to the latest python extension (I guess this is when it started), then I get this in the output window :

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\omartin\xy> & cmd /k "C:\Users\omartin\Anaconda3\Scripts\activate az-ml-sdk-batch-ai & powershell"
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

instead of the launch of the script.

Extension version: 2018.9.0
VS Code version: Code 1.28.0 (431ef9da3cf88a7e164f9d33bf62695e07c6c2a9, 2018-10-05T14:58:53.203Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz (8 x 2112)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 15.93GB (6.87GB free)
Process Argv
Screen Reader no
VM 0%

Activity

  1. AlexandreOuellet commented on Oct 11, 2018

    @AlexandreOuellet

    I too am experiencing exactly this (Same version of vscode and vscode-python extension).

    Windows PowerShell
    Copyright (C) Microsoft Corporation. Tous droits réservés.
    
    PS C:\Users\oueal\Documents\Projects\test> & cmd /k "C:\Users\oueal\AppData\Local\Continuum\anaconda3\Scripts\activate base &
    powershell"
    Windows PowerShell
    Copyright (C) Microsoft Corporation. Tous droits réservés.
    
    PS C:\Users\oueal\Documents\Projects\test> exit
    
    (base) C:\Users\oueal\Documents\Projects\test>exit
    PS C:\Users\oueal\Documents\Projects\test> cd 'c:\Users\oueal\Documents\Projects\test'; ${env:PYTHONIOENCODING}='UTF-8'; ${env:PYTHONUNBUFFERED}='1'; & 'C:\Users\oueal\AppData\Local\Continuum\anaconda3\python.exe' 'c:\Users\oueal\.vscode\extensions\ms-python.python-2018.9.0\pythonFiles\experimental\ptvsd_launcher.py' '50089' 'c:\Users\oueal\Documents\Projects\test\test.py'
    Hello world!
    PS C:\Users\oueal\Documents\Projects\test>
    

    I am able to debug by exiting the terminal twice, but that is highly inconvenient.

  2. q3ccn commented on Oct 11, 2018

    @q3ccn
  3. AlexandreOuellet commented on Oct 11, 2018

    @AlexandreOuellet
  4. DonJayamanne commented on Oct 11, 2018

    @DonJayamanne
  5. DonJayamanne commented on Oct 11, 2018

    @DonJayamanne
  6. DonJayamanne commented on Oct 11, 2018

    @DonJayamanne

    As a temporary work around, please disable the following setting in your user settings.json file:
    "python.terminal.activateEnvironment": false

  7. DonJayamanne commented on Oct 11, 2018

    @DonJayamanne

    Solution:

    • Open, activate and launch the debugger process in the terminal our selves, rather than passing this onto VSC.
    • This way, we can pass the activation script and run the debugger command in one go (combine the commands).
  8. AlexandreOuellet commented on Oct 11, 2018

    @AlexandreOuellet

    workaround : You can install the older extension version. You can download the vsix here : https://github.com/Microsoft/vscode-python/releases/tag/2018.8.0
    Make sure you disabled autoUpdate for extensions though

    Edit: DonJayamanne's solution is working, no need to use my workaround

  9. brettcannon commented on Oct 16, 2018

    @brettcannon
    Member

    Duplicate of #2732

  10. locked as resolved and limited conversation to collaborators on Nov 13, 2018
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-debuggingbugIssue identified by VS Code Team member as probable bugimportantIssue identified as high-priority

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions