-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Python debugger won't launch for conda-like envs not returned via conda env list
command
#18530
Comments
@thomascrocker This actually looks like #18530, Can you try what is mentioned in the instructions here and share what you get? If you are using conda make sure it is not this issue from conda conda/conda#11072 |
I am actually using an environment implemented via the "module load" interface. I use in VSCode by simply pasting the path to the interpreter in the bin/ folder of this environment. I tried the command in #18436 and get this:
It looks like there is a problem with the python extension when starting up, I have installed the latest version of the python extension again, and get this in the python output console when opening my project in vscode:
conda info returns:
|
@thomascrocker when you use this command you have to put in the environment that you are using, in the command i use
The logs seem normal, it is testing out what it can find out about the environments. |
Ah OK, I see..
This is with the latest version of the extension installed.
And settings.json
|
@thomascrocker It looks like the path was wrong can you try this?
|
Here you go, the command appears to have hung, or at the very least it's not returned yet:
|
@thomascrocker Looking at the python path you are using try running this command to see if it is listed by conda:
That command will not return. The fact you are seeing the json output means that the debugger seems to be able to start. You can kill that process (crtl+c or ctrl+q should do). The next step is to add {
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"logToFile": true, // <--- ADD THIS
"args": [
"recipe_GCM_and_RCM_pan_EU_20220207_101326",
"tas",
"JJA",
"recipe_GCM_global_tas_20220121_172015",
"CEU-3",
"--shape_file=/home/h02/tcrocker/code/EUCP_WP5_Lines_of_Evidence/shape_files/EUCP_WP3_domains/EUCP_WP3_domains.shp",
"--aerosols"
]
}
]
} |
I wonder if this is getting to the root of the problem. The "current" environment, is a software environment provided centrally via our IT teams and activated on the command line using "module load " functionality. In VSCode though, I just supply the direct path to the interpreter
Running conda locally only works I think with environments that are part of my conda install under my username..
(See that current is not listed here) Log file from debugger attached.. |
@thomascrocker Looks like the fact that we are identifying There are two possible workarounds: Can you provide details on how to create the module load environment locally? If we can re-produce this locally, we should be able to resolve this faster. Also, could you do a |
Thanks for the update. For now I will stick with option 1, since I know installing the previous version of the extension works. Regarding creating the module load environment.. I think all the module load command does is:
I have requested one of our developers who implements this system to contribute to this issue since they will know for sure what is going on a lot better than me. It will probably be tomorrow though since it's around 6pm here in the UK and most people's working day is pretty much over. Lastly here is the
|
@thomascrocker Thanks for details. I think what is tripping the extension up is the |
I think conda is used to create these environments, but I'm afraid I don't know the details. One of our developers should hopefully be able to fill in the blanks tomorrow. |
Unfortunately It should be possible to treat it 100% as an isolated python environment though, in the sense that everything relative to |
@jamesp Thanks for the details. Can you tell us how you create that environment? @karrtikr in the |
@karthiknadig it was created using conda-rpms which is a conda environment packaging utility. What specific information/files do you need in place to make the debugger workflow operate? We have recently migrated off this tooling, but there are a number of other tools that do similar things - e.g. conda-pack - so it may be worth checking that your assumptions are broadly compatible with how they work. For example. it may not be safe to assume that the conda binary is always available with a conda-created environment. |
I think the easier solution would be to just not identify these as conda environments instead of this. Is there a quick way to check that, other than the fact that |
@jamesp @tbombach @thomascrocker Can you provide the logs again? I'm interested in how we find such environments. Try setting Output for
|
@karrtikr OK, here are
|
I also have this issue. Since I have created the env in a devcontainer, I can share the exact environment specification needed to reproduce the problem. Hope that it helps! devcontainer.json
environment.yml
Dockerfile
|
When I create any environment in a fresh installation of Miniconda, then activate that environment, then type "code" from the terminal in that activated environment, then try to debug, I get this issue. @karrtikr -- feel free to ping me if you need a repro |
conda env list
command
@thomascrocker Can you try installing https://github.com/karrtikr/vscode-python/suites/5930400930/artifacts/202870711 and see if it fixes the issue? Use Extension: Install from VSIX command to install the VSIX. |
Hiya, I've not installed the VSIX. A recent batch of centrally installed system updates updated my python extension to
|
Issue Type: Bug
When using the debugger. Nothing happens other than the debug overlay appearing briefly for a second or so.
Same symptoms as this issue
#7927
This happens with python extension version 2022.0.01814523869
It does not happen with previous version 2021.12.1559732655
Expected vs. Actual Behaviour
Expect: degugging session to launch.
Actual: debugging session doesn't launch.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
Have python extension version 2022.0.01814523869 installed
Launch python debugger with F5 or via menus.
Diagnostic data
python.languageServer
setting: PylanceUser Settings
Extension version: 2021.12.1559732655
VS Code version: Code 1.63.2 (899d46d82c4c95423fb7e10e68eba52050e30ba3, 2021-12-15T09:39:46.686Z)
OS version: Linux x64 3.10.0-1160.53.1.el7.x86_64
Restricted Mode: No
System Info
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: disabled_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
A/B Experiments
The text was updated successfully, but these errors were encountered: