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.

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

See original GitHub issue

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® Core™ 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%

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
DonJayamannecommented, Oct 11, 2018

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).
1reaction
AlexandreOuelletcommented, 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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why doesn't VSCode activate conda before starting the ...
Basically we ask VS Code to launch a terminal with the activation commands and then launch the debugger, but the debugger is able...
Read more >
Efficient Way to Activate Conda in VSCode - Medium
Option 1: Create New Integrated Terminal (In Active Workspace) · Ctrl+Shift+P and search “Terminal”. · Choose “Terminal: Create New Integrated Terminal (In Active ......
Read more >
Python and Django tutorial in Visual Studio Code
If you open a separate command prompt or terminal, activate the environment by running source .venv/bin/activate (Linux/macOS) or .venv\Scripts\Activate.ps1 ( ...
Read more >
terminal not activating the conda environment : PY-23417
Why not just call activate <env-name> when the terminal opens? ... or 'debug' a script with my python interpreter set to my conda...
Read more >
Frequently Asked Questions — Spyder 5 documentation
Instead, just install Miniconda inside WSL2 and create a new conda environment (or use an existing conda- or virtualenv), then install Spyder-Kernels into...
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