text:
VSCode cannot open files from the traceback if they are with absolute paths but it can with relative paths

Applies To

[X] Notebooks (.ipynb files)
[ ] Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?
The error was narrowed down to this:
raise Exception("Opening ./mono_det_demo.py works, ~/sensus-loci/sensus/notebooks/mono_det_demo.py does not work, and neither does /home/user/sensus-loci/sensus/notebooks/mono_det_demo.py")

I can open the first file from the traceback, not the other two (file not found). With plain python I can open all of them. The issue only happens with remote ssh. I can open them correctly when using vscode locally.
VS Code Version
Version: 1.78.2 Commit: b3e4e68a0bc097f0ae7907b217c1119af9e03435 Date: 2023-05-10T14:47:05.613Z Electron: 22.5.2 Chromium: 108.0.5359.215 Node.js: 16.17.1 V8: 10.8.168.25-electron.0 OS: Linux x64 5.15.0-72-generic Sandboxed: Yes
Jupyter Extension Version
v2023.4.1011241018
Jupyter logs
Exception                                 Traceback (most recent call last)
Cell In[9], line 1
----> 1 raise Exception("./mono_det_demo.py works, ~/sensus-loci/sensus/notebooks/mono_det_demo.py does not work, and neither does /home/user/sensus-loci/sensus/notebooks/mono_det_demo.py")

Exception: ./mono_det_demo.py works, ~/sensus-loci/sensus/notebooks/mono_det_demo.py does not work, and neither does /home/user/sensus-loci/sensus/notebooks/mono_det_demo.py

Coding Language and Runtime Version
Python 3.8.16
Language Extension Version (if applicable)
Python extension v2023.8.0
Anaconda Version (if applicable)
conda 23.3.1
Running Jupyter locally or remotely?
Remote

I am also experiencing a similar issue. My environment is a remote setup using Remote SSH extension.
The issue occurs when I'm trying to open a file from a traceback link in a Jupyter notebook that's running on the remote server. When I click on the link, VSCode attempts to open the file locally instead of on the remote server, which obviously could fails if the file is not available locally. If I have a compatible path locally, it will open it, which is very confusing...
The problem is consistent for me regardless of how the file path is referenced in the traceback, i.e., whether it is absolute, relative, or contains user directory shorthand (~).
Here's my setup:
Version: 1.79.0-insider
Commit: b380da4ef1ee00e224a15c1d4d9793e27c2b6302
Date: 2023-06-07T14:30:25.999Z
Electron: 22.5.5
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Linux x64 6.2.8-060208-generic
Extensions:
Remote SSH: v0.103.2023060715
Jupyter: v2023.5.1001582324

The file links do not work in WSL at all. Just tried it in Windows natively, and it surprisingly worked - as long as there is no space in the path. But in WSL it does not work at all.

tracking in https://github.com/microsoft/vscode-jupyter/issues/13212

authors: amunger drauh ramajoballester thatguy7

repo: microsoft/vscode-jupyter


text:
Adding a command and shortcut for jupyter.changeCellToRaw

In Jupyter Notebook, when selecting a cell, you can press esc + r to transforme the cell from Python to Raw. This is particularly useful for disabling a cell, so that it doesn't execute when you choose "Execute all" or "Execute above cells".
See this question for more info: https://stackoverflow.com/questions/34192290/ipython-notebook-elegant-way-of-turning-off-part-of-cells
In VSCode, jupyter.changeCellToCode (esc+c) and jupyter.changeCellToMarkdown (esc+m) are already present, but not jupyter.changeCellToRaw (esc+r).
Would it be possible to add this command and corresponding shortcut?
If I propose a PR, will it be accepted?

Doesn't changing to markdown accomplish this same thing?

Technically, yes, but it's not the most convenient.
In the following screenshot you have 3 times the same cell, but as a Python, Raw, and Markdown format.

The first cell is executed if I maj+enter, Execute all or Execute above cells, which I don't want.
The second still has a "code" style, but the cell is deactivated and will not execute the Python code.
In the third one, the code will also not run, but it has a markdown style, resulting in a messy notebook. The comments in code will be interpreted has H1 header, everything will be on one line, and we will not see the difference between a real Markdown cell and a deactivated code cell.

I think this cell commenting feature should cover this scenario - you can now comment the full cell content with the standard toggle comment command.

source: gharchive/issue

authors: amunger maximecharriere

license: MIT

license_type: permissive

license_source: github-api


text:
Toggle text output as markdown

It would be nice to be able to toggle output as markdown preview - especially when I'm exploring nlp model outputs. The model outputs in markdown (but it comes back as plaintext), but it's really hard to read it so I have to copy it to a new md cell. Can we detect a way to render as markdown?
Current:

could you just use the IPython.display package?

I think we just need to leave this to the kernel - if we get the mime type of text/markdown, we can use the markdown renderer


text:
IPython HTML links should not use WebView external URL

Issue Type: Bug
When displaying an HTML link in IPython, the interactive window produces a link pointing to https://<uuid>.vscode-webview-test.com/vscode-resource/file///<path-to-project>/<url>. The expected behavior is to point to <url>.
Code sample:
# %%
from IPython.core.display import display, HTML

# %%
url = 'http://httpbin.org/ip'
text = 'Show my IP'
display(HTML(f'{text}'))

Extension version: 2021.5.842923320
VS Code version: Code 1.56.2 (054a9295330880ed74ceaedda236253b4f39a335, 2021-05-12T17:13:13.157Z)
OS version: Windows_NT x64 10.0.19042
Screen capture:

Thanks for the issue @kwikwag. This will be fixed on the release of VS Code 1.57, and that's coming either tomorrow or Wednesday!

authors: DavidKutu kwikwag


text:
Copy chart from python interactive mode output does not work

Issue Type: Bug
Copy chart from python notebook mode output does not work.
VS Code version: Code 1.57.0 (b4c1bd0a9b03c749ea011b06c6d2676c8091a70c, 2021-06-09T17:22:31.215Z)
OS version: Darwin x64 20.5.0
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz (8 x 2200)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
3, 2, 2

Memory (System)
16.00GB (0.26GB free)

Process Argv
. --crash-reporter-id 59e2029a-4b5f-4a37-83e8-70a9b297e3d0

Screen Reader
no

VM
0%

Extensions (17)

Extension
Author (truncated)
Version

codesnap
adp
1.3.2

gitlens
eam
11.5.1

go
gol
0.25.1

gc-excelviewer
Gra
3.0.42

latex-workshop
Jam
8.19.2

restructuredtext
lex
153.0.0

python
ms-
2021.6.944021595

vscode-pylance
ms-
2021.6.2

jupyter
ms-
2021.6.999406279

remote-containers
ms-
0.183.0

remote-ssh
ms-
0.65.7

remote-ssh-edit
ms-
0.65.7

remote-wsl
ms-
0.56.5

vscode-remote-extensionpack
ms-
0.21.0

polacode
pnp
0.3.4

lit-plugin
run
1.2.1

rust
rus
0.7.8

Thanks for filing this issue.
Please could you provide more information about this issue.
Please could you provide a screenshot of the issue & the button that doesn't work.

I ran into this also.
I can't copy any text from the interactive mode output.

Closing thi sissue as the interactive window UI has been overhauled, new version will be available tomorrow.
Please feel free to file an issue if this still doesnt' work in the new UI

authors: DonJayamanne b10102016 sockfish


text:
Run by line: Run All should stop RBL session

Testing https://github.com/microsoft/vscode/issues/133903

Start RBL in first cell, get several lines in
Click "Run All" at top of notebook while RBL still in progress in first cell
:bug: First cell seems to still be stuck in RBL, while all other cells in the notebook are also trying to run (have the option to stop them)

Once I stopped an arbitrary cell in the middle of the notebook, all the cells stopped executing, and RBL stopped in the first cell
The output below first cell says "Keyboard Interrupt"
I would've expected RBL to stop in first cell (similar to "Continue Execution") and then all other cells to run
I've attached the Jupyter output channel logs JupyterRBL9-28.txt

What happened was expected. The cells weren't running, they were queued to run after you were done using RBL. The error saying keyboard interrupt is also normal.
Although you make a good point. It would feel more responsive if clicking run all ends the RBL session and starts running immediately.

I don't know about that. Why would it be different from the case where a cell is running normally and you click "run all"?

My answer to that is because this is not only running, its also debugging. But I don't know what would be best.

I think we should look into what's expected, when user is in rbl can they run cells and vice versa and what the expected behavior.
to me Rbl and running cell are the same, we're still executing code.
It's similar to debugging regular code in vscode and then clicking the debug button again will really in vscode warning the user that a session is already in progress.

Let's do the same thing that we're doing if the user has currently running cells and they try to do run-by-line. We show a messagebox explaining the mode they're in.

Moving out of October since the workaround is fairly discoverable. Just interrupt executing any of the queued cells. RBL will then be stopped.

authors: DavidKutu DonJayamanne bamurtaugh greazer roblourens


text:
SVGs are served with incorrect Content-Type

Problem
Using SVG files as <img/> src is not working in live preview. Images are shown as broken/not found.

Probable cause
Looks like SVGs are served as text/html instead of image/svg+xml
Current response headers for a SVG:

Are you using the latest version of Live Preview? They have the correct content type for me.

Hmm, weird, now it seems to work correctly 🤔
I have v0.4.15 installed.
Since this seems to not be an issue, I'll close this one, sorry for the hassle.

authors: andreamah niklas-e

repo: microsoft/vscode-livepreview


text:
pwa-debug doesn't break for older version of node.js

testing https://github.com/microsoft/vscode/issues/85984:

make sure to have a node manager like "nvm" installed
install node version "8.11.4"
use simple one liner program console.log('hello world');
set breakpoint on first line
use this launch config:{
  "type": "pwa-node",
  "request": "launch",
  "name": "hello",
  "program": "${workspaceFolder}/hello.js",
  "runtimeVersion": "8.11.4"
},

Observe:
program doesn't stop on first line.
Adding a "debugger;" statement doesn't help either.
If you change the type attribute from "pwa-node" to "node" it works fine.

This is probably a duplicate of https://github.com/microsoft/vscode-pwa/issues/79, which should be fixed in the today's build that runs at 8 AM PST.

I'm not sure that this is a dup. Debugger statements should always be hit because they don't require a breakpoint from being registered.

vscode-pwa only supports slightly newer node versions, I think due to using the experimental 'inspector' module. Not sure what the minimum is, I think the latest 8.x should work. We need to figure that out and handle it...

May be https://github.com/microsoft/vscode-pwa/issues/134 then

Yeah I think it's covered by that

authors: connor4312 roblourens weinand

repo: microsoft/vscode-pwa


text:
pylint extension-pkg-whitelist=cv2 not working only when through the extension (Anaconda)

Environment data

VS Code version: 1.42.1
Extension version (available under the Extensions sidebar): 2020.2.64397
OS and version: Win 10 64 bit Home
Python version (& distribution if applicable, e.g. Anaconda): 3.7.6 64-bit Anaconda
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): conda
Relevant/affected Python packages and their versions:

pylint 2.4.4
astroid 2.3.3
Python 3.7.6 (default, Jan  8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)]

Relevant/affected Python-related VS Code extensions and their versions: Code Runner 0.9.16
Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info #3977): Jedi
Value of the python.languageServer setting: Microsoft

Expected behaviour
If I set argument "python.linting.pylintArgs": ["--extension-pkg-whitelist=cv2"], the linter should look up members in the cv2 module.
Actual behaviour

Steps to reproduce:

Open a script that imports cv2 in VSCode.

Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
> ~\Anaconda3\envs\cv\python.exe -m pylint --extension-pkg-whitelist=cv2 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text s:\shared\new_scripts\cvprocess.py
cwd: s:\shared\new_scripts
##########Linting Output - pylint##########
************* Module cvprocess
...
61,8,convention,invalid-name:Variable name "nh" doesn't conform to snake_case naming style
67,12,error,no-member:Module 'cv2' has no 'imread' member
68,22,error,no-member:Module 'cv2' has no 'threshold' member
68,35,error,no-member:Module 'cv2' has no 'imread' member
68,66,error,no-member:Module 'cv2' has no 'THRESH_BINARY' member
69,18,error,no-member:Module 'cv2' has no 'Canny' member
71,12,error,no-member:Module 'cv2' has no 'HoughLinesP' member
25,27,warning,unused-argument:Unused argument 'time'
...
-------------------------------------------------------------------

Your code has been rated at -5.48/10 (previous run: 2.86/10, -8.33)

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help; turn on source maps to make any tracebacks be useful by running Enable source map support for extension debugging)
(cv) S:\shared\new_scripts>%userprofile%\Anaconda3\envs\cv\python.exe -m pylint --extension-pkg-whitelist=cv2 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text s:\shared\new_scripts\cvprocess.py
************* Module cvprocess
...
61,8,convention,invalid-name:Variable name "nh" doesn't conform to snake_case naming style
25,27,warning,unused-argument:Unused argument 'time'
...
-------------------------------------------------------------------
Your code has been rated at 2.86/10 (previous run: -5.48/10, +8.33)

This was originally posted as a pylint issue but they diverted me here. It is really weird that running the same exe (I hope) with the same arguments results in different outputs. My terminal is set to Anaconda Prompt in the workspace.
Similar issues I found: #99, #606, #1648, #1993, #2879, #3562, #3802, #5257

This solves the issue for me:
"python.linting.pylintArgs": ["--generate-members"]

@ychechik I'm afraid it's not the cure but crashing pylint by a nonexistent parameter, that obviously prevents from detecting any errors.
See: https://github.com/PyCQA/pylint/issues/2426#issuecomment-541537420
But the solution they described doesn't work for me either.

Hi @747, thank you for reaching out and your detailed research!
Just to confirm what @karthiknadig said, does it work if you run %userprofile%\Anaconda3\envs\cv\python.exe -m pylint --extension-pkg-whitelist=cv2 in a terminal instance that doesn't have an activated environment?

@kimadeline Hi, I believe your comment contains an important keyword but I don't think I fully understand it. Namely, what should I do when I have to run something "in a terminal instance that doesn't have an activated environment"? Is this a Python term or Anaconda's?
I only have Anaconda installation in my machine, so when I switch to the other environment I just get:
3,0,error,import-error:Unable to import 'cv2'

Oh, I include my workspace settings (which were in the original issue).
		"python.pythonPath": "My\\Path\\to\\Anaconda3\\envs\\cv\\python.exe",
		"python.autoComplete.extraPaths": [
			"My\\Path\\to\\Anaconda3\\Lib\\site-packages"
		],
		"python.linting.pylintArgs": [
			"--generated-members=cv2.*",
			"--extension-pkg-whitelist=cv2"
		]

Environments are a Python concept, and conda/Anaconda have their own spin on it. From the conda documentation:

A conda environment is a directory that contains a specific collection of conda packages that you have installed. For example, you may have one environment with NumPy 1.7 and its dependencies, and another environment with NumPy 1.6 for legacy testing. If you change one environment, your other environments are not affected. You can easily activate or deactivate environments, which is how you switch between them.

There are good online resources explaining the difference between Python and conda environments, for example this one, but I disgress, let's get back to our issue 🙂
In the terminal output you copied:
(cv) S:\shared\new_scripts>%userprofile%\Anaconda3\envs\cv\python.exe -m pylint --extension-pkg-whitelist=cv2 --msg-template='{line},{column},{category},{symbol}:{msg}' --reports=n --output-format=text s:\shared\new_scripts\cvprocess.py
************* Module cvprocess
...
61,8,convention,invalid-name:Variable name "nh" doesn't conform to snake_case naming style
25,27,warning,unused-argument:Unused argument 'time'
...
-------------------------------------------------------------------
Your code has been rated at 2.86/10 (previous run: -5.48/10, +8.33)

The first line shows that the cv environment is activated inside your terminal, which gives your terminal access to the packages installed inside that environment.
However, when the extension runs commands on behalf of the user like linting or formatting, it doesn't do so inside an environment, which is what we're trying to replicate here.
👉 When you open a terminal, does the cv environment get activated automatically (does the prompt line start with (cv))? If so, you need to deactivate the environment for this terminal instance first by running conda deactivate. If after that  you have the (base) environment activated, you need to run conda deactivate again, so that you end up with no environment prefix:

And from there, run the same command as what the extension was running, namely %userprofile%\Anaconda3\envs\cv\python.exe -m pylint --extension-pkg-whitelist=cv2.

@kimadeline Thank you for your kind instruction. So I have tried it:
(cv) S:\shared\new_scripts>conda deactivate
S:\shared\new_scripts>"%userprofile%\Anaconda3\envs\cv\python.exe" -m pylint --extension-pkg-whitelist=cv2 cvprocess.py
************* Module cvprocess
...
cvprocess.py:67:12: E1101: Module 'cv2' has no 'imread' member (no-member)
cvprocess.py:68:22: E1101: Module 'cv2' has no 'threshold' member (no-member)
cvprocess.py:68:35: E1101: Module 'cv2' has no 'imread' member (no-member)
cvprocess.py:68:66: E1101: Module 'cv2' has no 'THRESH_BINARY' member (no-member)
cvprocess.py:69:18: E1101: Module 'cv2' has no 'Canny' member (no-member)
cvprocess.py:71:12: E1101: Module 'cv2' has no 'HoughLinesP' member (no-member)
...
-------------------------------------------------------------------
Your code has been rated at -5.48/10 (previous run: 0.48/10, -5.95)

Now I can confirm that it outputs exactly same errors the extension does.

What happens if you add --generated-members=cv2.* to the command being run? It would look like "%userprofile%\Anaconda3\envs\cv\python.exe" -m pylint --generated-members=cv2.* --extension-pkg-whitelist=cv2 cvprocess.py.

It still seems to print the same errors.
(cv) S:\shared\new_scripts>conda deactivate

S:\shared\new_scripts>"%userprofile%\Anaconda3\envs\cv\python.exe" -m pylint --generated-members=cv2.* --extension-pkg-whitelist=cv2 cvprocess.py
************* Module cvprocess
...
cvprocess.py:67:12: E1101: Module 'cv2' has no 'imread' member (no-member)
cvprocess.py:68:22: E1101: Module 'cv2' has no 'threshold' member (no-member)
cvprocess.py:68:35: E1101: Module 'cv2' has no 'imread' member (no-member)
cvprocess.py:68:66: E1101: Module 'cv2' has no 'THRESH_BINARY' member (no-member)
cvprocess.py:69:18: E1101: Module 'cv2' has no 'Canny' member (no-member)
cvprocess.py:71:12: E1101: Module 'cv2' has no 'HoughLinesP' member (no-member)
...
--------------------------------------------------------------------
Your code has been rated at -5.48/10 (previous run: -5.48/10, +0.00)

Hmmm 🤔
I will try to replicate your issue, see if we can walk through this together. Which command(s) did you use to install OpenCV? Do you also have a sample repo or sample code I could use to reproduce your pylint issue?
Thanks!

If my record is complete, this is all I have done to set up the environment (using Anaconda Prompt, IIRC).
> conda create -n cv python=3.7 anaconda
> conda activate cv
> pip install opencv-python
> pip install opencv-contrib-python

Sorry I didn't get back to you sooner @747!
Can you try opening VS Code from inside a terminal (code .) without deactivating it?

Hi, do you mean opening VSCode from external terminal (prompt)?
I tried launching VSCode from Anaconda Prompt:
(cv) C:\WINDOWS\system32>cd /d S:\shared\new_scripts

(cv) S:\shared\new_scripts>code .

When I call my workspace inside the new VSCode, pylint complains no more about missing members 😮
So, is that the correct way to use VSCode with Anaconda?

Hurray it worked 🥳
Yes, you should be launching VS Code from the Anaconda prompt. On our side we should make it more explicit in the docs (https://github.com/microsoft/vscode-docs/issues/3481), and we will work towards telling users directly while in the extension as well (https://github.com/microsoft/vscode-python/issues/10626). You are more than welcome to upvote these 2 issues to bump up their visibility and priority.
Using conda run to run tools in the extension would most likely solve the pylint issue you reported originally, however it isn't stable enough yet for us to use it (https://github.com/microsoft/vscode-python/issues/9490).
Closing in favour of https://github.com/microsoft/vscode-docs/issues/3481 and https://github.com/microsoft/vscode-python/issues/10626.
Thank you for your patience!

Thank you for all your time and support, otherwise I'd not ever realize that problem. I'm going to support those issues.

authors: 747 kimadeline ychechik

repo: microsoft/vscode-python


text:
Python crashes in VSCode Terminal

Python crashes in the Terminal in VSCode.

Environment
Does this issue occur when all extensions are disabled?: Yes
Version: 1.75.0-insider (Universal)
Commit: 0615c4f98b07b51d3be6a357e22afec119490c5a
Date: 2023-01-31T00:09:14.434Z (1 day ago)
Electron: 19.1.9
Chromium: 102.0.5005.194
Node.js: 16.14.2
V8: 10.2.154.23-electron.0
OS: Darwin arm64 22.1.0
Sandboxed: Yes

OS Version: macOS 13.0.1 (22A400)
Chip: Apple M1 Pro
Memory: 16 GB

Steps to Reproduce:
requirements.txt
google-cloud-secret-manager==2.15.1
grpcio==1.49.1

broken.py
from google.cloud import secretmanager

import sys
print("sys.path", flush=True)
for i, p in enumerate(sys.path):
    print(f"{i}: {p}")

print("PATH", flush=True)
import os
for i, p in enumerate(os.getenv("PATH").split(":")):
    print(f"{i}: {p}", flush=True)

for i in range(10):
    print(i, flush=True)
    secretmanager.SecretManagerServiceClient()

$ python --version
Python 3.9.11

$ python -m venv broken
$ pip cache purge
$ source broken/bin/activate
$ pip install -r requirements.txt
$ python broken.py > terminal
$ /Applications/Visual\ Studio\ Code\ -\ Insiders.app/Contents/Resources/app/bin/code --disable-extensions

The below is run in the Terminal in VSCode
$ source broken/bin/activate
$ python broken.py > vscode
python(65710,0x1e2626500) malloc: Corruption of free object 0x155f065f0: msizes 8/7 disagree
python(65710,0x1e2626500) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      python broken.py
$ diff vscode terminal
33a34,41
> 2
> 3
> 4
> 5
> 6
> 7
> 8
> 9

NB: This failure does not occur when grpcio==1.50.0.

The error suggests it's a memory allocation issue in the Python interpreter, most likely caused by grpcio 1.49.1 if upgrading fixed it. I'm not seeing how VS Code is a cause of this since we don't automatically set any environment variables or anything that would influence how Python operates.
My best guess is you have a setting that causes the terminal in VS Code to be different from the one you tested in (e.g. different shells, different environment variables, etc.). I would double-check that to see where the differences might be in terms of the environment.

Sorry for persisting, but I’m running a brand new installation with no existing vs code config settings. For all intents and purposes, I’m effectively on a new machine with a fresh install. Shouldn’t the default vscode terminal env be consistent with Terminal.app settings on install? Any suggestions for what I can check? The python paths and system path are identical. I’m also able to run other memory intensive programs in python with pandas and numpy from within vs code’s terminal without issues. Is there any chance that it’s not an OOM error and potentially a different kind of bug? Are you unable to repro?

Also, fwiw, the same failure occurs in the vscode-jupyter extension. Would that also be using the same environment as the vscode terminal?

Shouldn’t the default vscode terminal env be consistent with Terminal.app settings on install?

Not necessarily. The best way to do tell if you're running the exact same Python interpreters is to run python -c "import sys; print(sys.executable)" in both situations.

Would that also be using the same environment as the vscode terminal?

It all depends on what interpreter you have selected in the Jupyter extension to provide your Jupyter kernel.

Both are using the same interpreter. The venv is being created and activated in the repro steps above. This confirms it:
$  python -c "import sys; print(sys.executable)"
/Users/julius/src/debug_plugin_crash/.venv/bin/python

Digging into env is a good suggestion. I think I just found the cause! There is a MallocNanoZone=0 env variable in the VSCode terminal that appears to reliably cause the crash. In other words, this causes a crash in Terminal.app:
MallocNanoZone=0 python broken.py

I've never set this env variable in my life. It seems to be part of the Visual Studio Code app:
$ find /Applications/Visual\ Studio\ Code\ -\ Insiders.app/ -type f -exec grep -H MallocNanoZone {} \;
/Applications/Visual Studio Code - Insiders.app//Contents/Frameworks/Code - Insiders Helper (Plugin).app/Contents/Info.plist:		<key>MallocNanoZone</key>
/Applications/Visual Studio Code - Insiders.app//Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist:		<key>MallocNanoZone</key>
/Applications/Visual Studio Code - Insiders.app//Contents/Frameworks/Code - Insiders Helper.app/Contents/Info.plist:      <key>MallocNanoZone</key>
/Applications/Visual Studio Code - Insiders.app//Contents/Frameworks/Code - Insiders Helper (GPU).app/Contents/Info.plist:		<key>MallocNanoZone</key>
/Applications/Visual Studio Code - Insiders.app//Contents/Frameworks/Code - Insiders Helper (Renderer).app/Contents/Info.plist:		<key>MallocNanoZone</key>
/Applications/Visual Studio Code - Insiders.app//Contents/Info.plist:		<key>MallocNanoZone</key>

Although, I'm not seeing it anywhere in https://github.com/microsoft/vscode
Google is not a tremendous amount of help for this variable. Should be some logic prior to setting this in the env?

This is the best documentation that I've found about that env variable: https://shapeof.com/archives/2015/10/mallocnanozone.html

authors: JuliusDegesys brettcannon


text:
pandas.DataFrame variables with MultiIndex won't be showed correctly in data viewer

In data viewer, index of a pandas.DataFrame variable with MultiIndex will not be correctly showed.

Jupyter server running:                       Local
Extension version:                               2019.10.44104 (22 October 2019)
VS Code version:                                1.39.2
Setting python.jediEnabled:               false
Python and/or Anaconda version:     3.7.4(x64)
OS:                                                     Windows
Virtual environment:                         N/A

a sample of code
import pandas as pd
import random
list1 = [[random.uniform(0, 1) < 0.5 for i in range(20)], [random.uniform(
    0, 1) < 0.5 for i in range(20)], [random.uniform(0, 1) < 0.5 for i in range(20)]]
data1 = pd.DataFrame(list1)
data1 = data1.T
data1.columns = ['a', 'b', 'c']
data1['d'] = 1
data2 = data1.groupby(['a', 'b', 'c']).count()
data2

Thanks for letting us know. We'll look into it.
Also thanks for your code sample, it made it quick to reproduce the issue.

Duplicate of #6663

authors: DavidKutu DonJayamanne ganxy1028


text:
Opening VS Code from WSL fully saturates CPU, system unusable

Issue Type: Bug
When I open VS Code from a workspace directory in WSL, several node processes are started, which fully saturate my CPU for several minutes, until I force them to exit by killing them.
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   8896   176 ?        Ssl  12:36   0:00 /init
oliver     620  0.0  0.0  14080   404 ?        Ss   13:04   0:00 ssh-agent
root       741  0.0  0.0   8908   224 tty2     Ss   13:49   0:00 /init
oliver     742  0.0  0.0  10656   688 tty2     S    13:49   0:00 sh -c "$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" cd9ea6488829f560dc949a8b2fb789f3cdc05f5d stable .vscode-server 0  --disable-telemetry
oliver     743  0.0  0.0  10656   752 tty2     S    13:49   0:00 sh /mnt/c/Users/OliverSalzburg/.vscode/extensions/ms-vscode-remote.remote-wsl-0.44.4/scripts/wslServer.sh cd9ea6488829f560dc949a8b2fb789f3cdc05f5d stable .vscode-server 0 --disable-telemetry
oliver     748  0.0  0.0  10656   720 tty2     S    13:49   0:00 sh /home/oliver/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/server.sh  --port=0 --use-host-proxy --fileWatcherPolling=0 --disable-telemetry
oliver     750  0.1  0.0 958980 44876 tty2     Sl   13:49   0:02 /home/oliver/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/node /home/oliver/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/out/vs/server/main.js  --port=0 --use-host-proxy --fileWatcherPolling=0 --disable-telemetry
oliver     781 85.7  0.0 884076 48068 tty2     Sl   13:49  21:18 /home/oliver/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/node /home/oliver/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/out/bootstrap-fork --type=extensionHost --uriTransformerPath=/home/oliver/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/out/vs/server/uriTransformer.js --useHostProxy=
root       800  0.0  0.0   8904   220 tty1     Ss   13:51   0:00 /init
oliver     801  0.0  0.0  18208  3824 tty1     S    13:51   0:00 -bash
oliver    1845  324  0.1 2609892 110336 tty2   Z    14:06  26:02 /home/oliver/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/node /home/oliver/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/out/bootstrap-fork --type=watcherService
oliver    1947 45.8  0.0 1084788 55664 tty2    Sl   14:11   1:23 /home/oliver/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/node /home/oliver/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/out/bootstrap-fork --type=extensionHost --uriTransformerPath=/home/oliver/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/out/vs/server/uriTransformer.js --useHostProxy=
oliver    1958 1047  0.0 2576288 31204 tty2    Rl   14:11  31:25 /home/oliver/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/node /home/oliver/.vscode-server/bin/cd9ea6488829f560dc949a8b2fb789f3cdc05f5d/out/bootstrap-fork --type=watcherService
oliver    3096  0.0  0.0  18648  1896 tty1     R    14:14   0:00 ps aux
oliver    3097  0.0  0.0  15644  1328 tty1     S    14:14   0:00 less

VS Code version: Code 1.46.1 (cd9ea6488829f560dc949a8b2fb789f3cdc05f5d, 2020-06-17T21:13:20.174Z)
OS version: Windows_NT x64 10.0.18363
Remote OS version: Linux x64 4.4.0-18362-Microsoft
Remote OS version: Linux x64 4.4.0-18362-Microsoft

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz (12 x 3672)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledviz_display_compositor: enabled_onviz_hit_test_surface_layer: disabled_off_okwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
63.91GB (48.47GB free)

Process Argv
C:/Users/OliverSalzburg/.profile

Screen Reader
no

VM
0%

Item
Value

Remote
WSL: Ubuntu-20.04

OS
Linux x64 4.4.0-18362-Microsoft

CPUs
Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz (12 x 3601)

Memory (System)
63.91GB (48.49GB free)

VM
0%

Item
Value

Remote
WSL: Ubuntu-20.04

OS
Linux x64 4.4.0-18362-Microsoft

CPUs
Intel(R) Core(TM) i7-6850K CPU @ 3.60GHz (12 x 3601)

Memory (System)
63.91GB (48.46GB free)

VM
0%

Extensions (9)

Extension
Author (truncated)
Version

eslint-disable-snippets
drK
1.2.0

output-colorizer
IBM
0.1.2

remote-containers
ms-
0.122.1

remote-ssh
ms-
0.51.0

remote-ssh-edit
ms-
0.51.0

remote-wsl
ms-
0.44.4

vscode-remote-extensionpack
ms-
0.20.0

debugger-for-chrome
msj
4.12.8

vscode-icons
vsc
10.1.1

(1 theme extensions excluded)

When I reported this originally, I was still using WSL1. I have now installed Windows 10 2004 and WSL2, in the hope to resolve this performance problem.
It actually got much worse as a result of the upgrade. When I now open the workspace my system actually fully freezes and needs to be hard-reset. Without interaction it takes about 10 minutes before it becomes responsible enough for me to kill VS Code.

Okay, I merely installed WSL2 and hadn't switched my distribution over yet (wsl --set-version Ubuntu-20.04 2). After switching the distribution over to WSL2, the system no longer freezes.

repo: microsoft/vscode


text:
Cannot connect to remote via ssh unless .vscode-server folder on the remote is deleted

VSCode Version: 1.47.3
OS Version: MS Windows 10 Enterprise 10.0.17763
Remote OS Version: Ubuntu 18.04.4

Steps to Reproduce:

Try to connect to a remote via ssh from VSCode and get the following output (note: I exchanged the remote name with ):

[14:38:47.598] Log Level: 2
[14:38:47.598] remote-ssh@0.51.0
[14:38:47.598] win32 x64
[14:38:47.600] SSH Resolver called for "ssh-remote+<remote>", attempt 1
[14:38:47.600] SSH Resolver called for host: <remote>
[14:38:47.600] Setting up SSH remote "<remote>"
[14:38:47.609] Using commit id "91899dcef7b8110878ea59626991a18c8a6a1b3e" and quality "stable" for server
[14:38:47.611] Install and start server if needed
[14:38:47.614] Checking ssh with "ssh -V"
[14:38:47.659] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[14:38:47.662] Running script with connection command: ssh -T -D 63250 <remote> bash
[14:38:47.666] Terminal shell path: C:\windows\System32\cmd.exe
[14:38:47.780] >
[14:38:47.780] Got some output, clearing connection timeout
[14:38:48.277] > 50fa0c6793a4: running
>
[14:38:48.309] > Acquiring lock on /home/markofilipovic/.vscode-server/bin/91899dcef7b8110878ea59
> 626991a18c8a6a1b3e/vscode-remote-lock.markofilipovic.91899dcef7b8110878ea5962699
> 1a18c8a6a1b3e
> \ln /home/markofilipovic/.vscode-server/bin/91899dcef7b8110878ea59626991a18c8a6a
> 1b3e/vscode-remote-lock.markofilipovic.91899dcef7b8110878ea59626991a18c8a6a1b3e.
> target /home/markofilipovic/.vscode-server/bin/91899dcef7b8110878ea59626991a18c8
> a6a1b3e/vscode-remote-lock.markofilipovic.91899dcef7b8110878ea59626991a18c8a6a1b
> 3e
> Found existing installation at /home/markofilipovic/.vscode-server/bin/91899dcef
> 7b8110878ea59626991a18c8a6a1b3e...
> Found running server...
>
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
> *
>
>
[14:38:48.357] > Checking server status on port 35669 with wget
> failed: Connection refused.
> 50fa0c6793a4##28##
>
[14:38:48.358] Received install output: 50fa0c6793a4##28##
[14:38:48.359] Server status check failed - waiting and retrying
[14:38:48.611] "install" terminal command done
[14:38:48.612] Install terminal quit with output:
[14:38:49.362] Running script with connection command: ssh -T -D 63250 <remote> bash
[14:38:49.363] Terminal shell path: C:\windows\System32\cmd.exe
[14:38:49.478] >
[14:38:49.478] Got some output, clearing connection timeout
[14:38:50.016] > 50fa0c6793a4: running
> Acquiring lock on /home/markofilipovic/.vscode-server/bin/91899dcef7b8110878ea59
> 626991a18c8a6a1b3e/vscode-remote-lock.markofilipovic.91899dcef7b8110878ea5962699
> 1a18c8a6a1b3e
> \ln /home/markofilipovic/.vscode-server/bin/91899dcef7b8110878ea59626991a18c8a6a
> 1b3e/vscode-remote-lock.markofilipovic.91899dcef7b8110878ea59626991a18c8a6a1b3e.
> target /home/markofilipovic/.vscode-server/bin/91899dcef7b8110878ea59626991a18c8
> a6a1b3e/vscode-remote-lock.markofilipovic.91899dcef7b8110878ea59626991a18c8a6a1b
> 3e
>
[14:38:50.044] > Found existing installation at /home/markofilipovic/.vscode-server/bin/91899dcef
> 7b8110878ea59626991a18c8a6a1b3e...
> Found running server...
>
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057)
> *
>
>
[14:38:50.079] > Checking server status on port 35669 with wget
> failed: Connection refused.
> 50fa0c6793a4##28##

This keeps on repeating several times.
As per advice of @roblourens , running the command
wget --no-proxy -nv -O - http://127.0.0.1:35669/delay-shutdown
produces
failed: Connection refused.

Does this issue occur when all extensions are disabled?: Yes/No

Can you describe what happens after deleting the remove .vscode-server? Does it resolve the problem or does this re-occur?

authors: MarkoMFilip aitc-h


text:
vscode-github.login cannot allow

System: MacOS
version: 1.50
vscode-github.com  password is not correct
i've tried thousands of times, but not works

This is a known issue: https://github.com/microsoft/vscode/issues/107480

Merging to https://github.com/microsoft/vscode/issues/108342#issuecomment-706340396, please check that comment for background.

authors: RomeoChen SachinShekhar deepak1556


text:
C++ debugging character arrays and strings:  and "Converting character sets: Invalid argument."

When debugging a C++ file containing character arrays or strings, the contents of the array/string are not shown, but instead shows "<error reading variable>" for character arrays and "Converting character sets: Invalid argument." for strings. Integer arrays are not affected:

However, what puzzles me is that on a different machine but with the exact same VSCode version (1.52.1), C/C++ extension version (v1.1.3) and C++ compiler (mingw-w64 x86_64-8.1.0-posix-seh-rt_v6-rev0), and launch.json file, the contents of the array/string appears normally:

The contents of launch.json are given below:
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "g++.exe - Build and debug active file",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "C:\\Program Files\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin",
            "environment": [],
            "externalConsole": false,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\Program Files\\mingw-w64\\x86_64-8.1.0-posix-seh-rt_v6-rev0\\mingw64\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: g++.exe build active file"
        }
    ]
}

This problem has been posted elsewhere but with no solutions, as seen here and here

VSCode Version: 1.52.1
OS Version: Windows 10 20H2

Steps to Reproduce:

Create character array in C++ file
Start Debugging

Does this issue occur when all extensions are disabled?: Yes/No
Disabling extensions disables the debugger, so I cannot tell if the issue still occurs.

/extCpp

/extCpp

Since this issue is caused by the C/C++ extension, please open this issue there. Thanks!

Since this issue is caused by the C/C++ extension, please open this issue there. Thanks!

authors: RMacfarlane georgetian3 jrieken