Closed scruel closed 2 weeks ago
I have the exactly same issue, hope to fix this quickly
Got the same issue lately.
Even if you manually select "from_pretrained" in a call stack and then do F10 it will jump back to
Sometimes it's getting even more in the way when there are one more external level - you won't be able to select the layer right away, first you'll need to click "Show N more stack frames" to see "from_pretrained" entry. And on each step layers get hidden and you need to reload them again.
As a current workaround, you can open the layer you need to keep it in a separate VS Code window - so you'll have both
My version:
Version: 1.91.0-insider (user setup)
Commit: fec18ef7d6793521c4683e67e569579ea970cc6d
Date: 2024-06-10T05:48:36.787Z
Electron: 29.4.0
ElectronBuildId: 9593362
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22635
Python Debugger: v2024.7.11591013 (pre-release)
Disable "justmycode" in user settings:
import inspect
import sys
inspect.getmembers(sys) # set breakpoint here and do step in with F11
Launch debugger without launch.json:
I am encountering the same issue as well
Hi, I am encountering the same issue as well.
This is my minimum reproducible example:
from transformers import BertTokenizerFast, BertModel
def main():
model_name = "google-bert/bert-base-uncased"
tokenizer = BertTokenizerFast.from_pretrained(model_name)
model = BertModel.from_pretrained(model_name)
words = [
["word1*word2|word3"],
["word1*", "word2|", "word3"],
]
tokenizer_out = tokenizer(
text=words,
is_split_into_words=True,
return_offsets_mapping=True,
return_overflowing_tokens=True,
truncation="longest_first",
padding="max_length",
return_tensors="pt",
max_length=512,
stride=0,
return_length=True,
)
# Input IDs and attention mask
input_ids = tokenizer_out["input_ids"]
attention_mask = tokenizer_out["attention_mask"]
# Inference with the mask
model.eval()
outputs = model(input_ids, attention_mask=attention_mask)
print(outputs)
if __name__ == "__main__":
main()
and every time I try and step into the code from the transformers
library, I get brought back to my own masking_exploration.py
module. I have to click the Show 2 More Stack Frames
under the Call Stack
, and then go back into the code in the transformers
library.
Got the same issue after update VSCode to 1.90.0. Workaround: downgrade VSCode to 1.89.1 Here is full VSCode about screen of version where step in other libraries is working
Version: 1.89.1 (system setup)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:13:33.891Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22631
Same problem here
VS Code Version 1.90.0
Debugpy Version v2024.6.0
Python Version 3.12.2
OS Windows
downgrading just the extension doesn't help
very good! Thanks for the info!
Is there way to safely downgrade to VS Code 1.89.1 besides just uninstalling and installing it? Is there any chance to lose some settings/data during reinstall?
Is there way to safely downgrade to VS Code 1.89.1 besides just uninstalling and installing it? Is there any chance to lose some settings/data during reinstall?
I don't think there is :( I kept a copy of ~/Library/Application\ Support/Code/User
and ~/.vscode/extensions
(I use a Mac) to preserve my settings and keybindings before I deleted VSCode 1.9 and installed 1.89
I am running into the same issue. Making it impossible to debug anything
Even with this extension setting disabled:
VS Code Version 1.90.0
Debugpy Version v2024.6.0
Python extension v2024.8.0
Python Version 3.10.11
OS Windows
Found this is a duplicate of https://github.com/microsoft/debugpy/issues/1598 and ultimately a VS Code issue that's documented here: https://github.com/microsoft/vscode/issues/214433'
FYI: A fix has been released in v1.90.1 which is available here: https://code.visualstudio.com/insiders/ but note this is not a stable release yet
Closed in: #214433
I'm on insiders version, can confirm that it now seems to work as before.
Version: 1.91.0-insider (user setup)
Commit: 0a417782b1781d39803b8f1791cfb22f8835ddae
Date: 2024-06-13T05:48:47.964Z
Electron: 29.4.0
ElectronBuildId: 9593362
Chromium: 122.0.6261.156
Node.js: 20.9.0
V8: 12.2.281.27-electron.0
OS: Windows_NT x64 10.0.22635
Logs:
I can manually click to call stack to jump, and the active code line is green rather than yellow:![image](https://github.com/microsoft/vscode-python-debugger/assets/16933298/cd492ec4-34cb-42bf-a546-4b3401a36b31)