Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
omartin2010 opened this issue Oct 11, 2018 · 9 comments
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority

Comments

@omartin2010
Copy link

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%
@AlexandreOuellet
Copy link

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.

@q3ccn

This comment has been minimized.

@AlexandreOuellet

This comment has been minimized.

@DonJayamanne

This comment has been minimized.

@DonJayamanne

This comment has been minimized.

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug needs PR area-debugging important Issue identified as high-priority labels Oct 11, 2018
@DonJayamanne
Copy link

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

@DonJayamanne
Copy link

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).

@AlexandreOuellet
Copy link

AlexandreOuellet commented Oct 11, 2018

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

@brettcannon
Copy link
Member

Duplicate of #2732

@brettcannon brettcannon marked this as a duplicate of #2732 Oct 16, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Nov 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug important Issue identified as high-priority
Projects
None yet
Development

No branches or pull requests

5 participants