microsoft/debugpy

When JustMyCode Disabled, the breakpoint does not automatically stop at the script exception

joon612 opened this issue · 7 comments

When justMyCode is false in launch.json, the breakpoint does not automatically stop at the script exception. And if the break point is set, it doesn't stop there.

(env) PS C:\Users\user> conda --version
conda 24.5.0
(env) PS C:\Users\user> python -V
Python 3.9.19
(env) PS C:\Users\user> code --version
1.91.1
f1e16e1e6214d7c44d078b1f0607b2388f29d729
x64

Reproduce:
Recording 2024-07-18 at 08 51 40

This looks like another case for this issue here:
microsoft/vscode#214433

The exception is being hit but VS code is not showing the callstack.

I can't reproduce the issue though.

I used this code:

import json
import sys

from pathlib import Path

def main():
    input_path = Path(r"/non-existent-path")
    print(list(input_path.rglob("*.whl"))[1])

main()

And tried it with justMyCode by true and false. I get the exception in both cases.

Can you double-check that you're using the latest VS code? The help about should show something like this;

image

Oh I can reproduce the problem when it's set to catch the raise of the exception too.

There's an error from VS code here:
image

That path seems to be invalid. Not sure why.

Oh that's because that's the error. The issue is in VS code. It seems to be another symptom of the original issue. Closing this one again.

Here's the logs for when this reproduces:

debugger_logs.zip

Can you double-check that you're using the latest VS code? The help about should show something like this;

image

image
here it is, it's latest one