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

Debugger hides traceback/error message and doesn't naviagate to package source when justMyCode: false #1773

Closed
laundmo opened this issue Oct 9, 2024 · 5 comments
Assignees
Labels
needs repro Issue has not been reproduced yet

Comments

@laundmo
Copy link

laundmo commented Oct 9, 2024

Type: Bug

  1. set "justMyCode": false in launch.json
  2. debug a python script which causes a exception in another package
  3. note how the debugger stops in my own code, and doesn't display the big red error message and traceback box like it used to

There seem to be 2 possibly related issues happening here:

  1. VSCode displays the debugger as paused on the latest line in my own code.
  2. VSCode doesn't display the big red box inside my code which shows the error message and traceback

Note: i can do the following steps to see the big red box of traceback for the package which raised it:

  1. have the debug tab open
  2. click the upper "Show More Stack Frames" line
  3. click on the topmost stack frame
  4. observe vscode jump to the correct file (of the package) and display the big red box with the traceback
  5. the highlight for the line is green instead of yellow, showing that its not considered the "primary" line on which this exception happened.

PS: i also noticed that i'm unable to step over or continue execution on exceptions, which used to be possible (this would close the debugger with the exception being printed normally to stderr if its uncaught).

VS Code version: Code 1.94.1 (e10f2369d0d9614a452462f2e01cdc4aa9486296, 2024-10-05T05:44:32.189Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs 11th Gen Intel(R) Core(TM) i5-11600K @ 3.90GHz (12 x 3912)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 15.62GB (7.76GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (68)
Extension Author (truncated) Version
vscode-css-formatter aes 1.0.2
toml be5 0.6.0
vscode-custom-css be5 7.3.1
markdown-checkbox bie 0.4.0
ruff cha 2024.50.0
gitignore cod 0.9.0
xml Dot 2.5.1
EditorConfig Edi 0.16.4
prettier-vscode esb 11.0.0
code-runner for 0.12.2
shell-format fox 7.2.5
todo-tree Gru 0.0.226
language-cython guy 0.0.8
output-colorizer IBM 0.1.2
prettier-sql-vscode inf 1.6.0
easy-snippet inu 0.7.5
search-editor-apply-changes jak 0.1.1
vscode-edit-csv jan 0.10.0
batch-rename-extension Jan 0.0.6
hungry-delete jas 1.7.0
dupchecker jia 0.1.7
vscode-text-pastry jkj 1.3.1
vscode-position jtr 1.1.2
vsc-python-indent Kev 1.18.0
rainbow-csv mec 3.12.0
git-graph mhu 1.30.0
vscode-checkpoints mic 1.3.3
dotenv mik 1.0.1
djlint mon 2024.7.0
vscode-apache mrm 1.2.0
debugpy ms- 2024.11.2024092501
python ms- 2024.16.0
vscode-pylance ms- 2024.10.1
jupyter ms- 2024.9.1
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.19
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
remote-ssh ms- 0.115.0
remote-ssh-edit ms- 0.87.0
remote-wsl ms- 0.88.4
vscode-remote-extensionpack ms- 0.25.0
powershell ms- 2024.2.2
remote-explorer ms- 0.4.3
remote-server ms- 1.5.2
test-adapter-converter ms- 0.2.0
vs-sequential-number nep 1.1.0
gremlins nho 0.26.0
autodocstring njp 0.6.1
indent-rainbow ode 8.3.1
explorer-exclude Pet 1.3.2
material-icon-theme PKi 5.11.1
subtle-brackets raf 3.0.0
vscode-yaml red 1.15.0
vscode-sort-json ric 1.20.0
synthwave-vscode Rob 0.1.15
jinjahtml sam 0.20.0
rewrap stk 1.16.3
control-snippets svi 1.9.1
even-better-toml tam 0.19.2
open-in-browser tec 2.0.0
semantic-rainbow the 1.1.8
shellcheck tim 0.37.1
pdf tom 1.2.2
simple-rst tro 1.5.4
errorlens use 3.20.0
vscode-conventional-commits viv 1.26.0
jinja who 0.0.8

(2 theme extensions excluded)

@laundmo laundmo changed the title Debugger hides traceback/error message or doesn't naviage to package source when justMyCode: false Debugger hides traceback/error message or doesn't naviagate to package source when justMyCode: false Oct 9, 2024
@laundmo laundmo changed the title Debugger hides traceback/error message or doesn't naviagate to package source when justMyCode: false Debugger hides traceback/error message and doesn't naviagate to package source when justMyCode: false Oct 9, 2024
@TomIsFat
Copy link

I'm facing the same issue, but in my case, it's due to a missing path:
FileNotFoundError: [Errno 2] No such file or directory: '/xxx/mambaforge/envs/pip38/lib/python38.zip'.
The issue occurs in both the native Python environment and mambaforge(conda).

@karthiknadig karthiknadig transferred this issue from microsoft/vscode Dec 11, 2024
@github-actions github-actions bot added the needs repro Issue has not been reproduced yet label Dec 11, 2024
@rchiodo
Copy link
Contributor

rchiodo commented Dec 11, 2024

This is by design. VS code doesn't show the big red box for 'hidden' frames anymore. You have to expand them manually.

Example:

Image

This is what you'll get now for non user code.

@rchiodo rchiodo closed this as completed Dec 11, 2024
@rchiodo
Copy link
Contributor

rchiodo commented Dec 11, 2024

If you expand the stack frames and double click on the top one, then you get the big red box:

Image

@laundmo
Copy link
Author

laundmo commented Dec 11, 2024

Would it be possible to get a setting in launch.json to re-enable this? this choice is quite annoying since most if the time the exceptions i'm debugging happen in library code.

@rchiodo
Copy link
Contributor

rchiodo commented Dec 11, 2024

You'd have to ask VS code for that. It's not something that debugpy can control/change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs repro Issue has not been reproduced yet
Projects
None yet
Development

No branches or pull requests

5 participants