microsoft / vscode-python-debugger

Python debugger (debugpy) extension for VS Code.
https://marketplace.visualstudio.com/items?itemName=ms-python.debugpy
MIT License
57 stars 24 forks source link

justMyCode setting seems to be ignored after the first debugger launch #266

Closed gsavchuk closed 5 months ago

gsavchuk commented 6 months ago

Type: Bug

When I start VsCode, I can setup a breakpoint inside the code in the site-packages directory. But after the first debug session, the plugin acts as if justMyCode is True. Attaching a screen recording which demonstrates the problem.

https://github.com/microsoft/vscode-python-debugger/assets/4836681/7950483d-8786-40ce-97ae-3678ffd8034c

My workspace config file:

{
    "python.testing.unittestEnabled": false,
    "python.testing.pytestEnabled": true,
    "python.testing.cwd": "${workspaceFolder}/platform/logger",
    "debugpy.debugJustMyCode": false,
    "launch": {
        "configurations": [
            {
                "name": "Python Debugger: Python File",
                "type": "debugpy",
                "request": "launch",
                "program": "${file}",
                "justMyCode": false,
                "purpose": ["debug-test"]
            },
        ],
        "compounds": []
    },
    "debug.allowBreakpointsEverywhere": true
}

Extension version: 2024.2.0 VS Code version: Code 1.87.2 (863d2581ecda6849923a2118d93a088b0745d9d6, 2024-03-08T15:21:31.043Z) OS version: Darwin x64 23.3.0 Modes:

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|3, 4, 4| |Memory (System)|16.00GB (0.19GB free)| |Process Argv|--crash-reporter-id ef6541f7-1390-48a6-bb34-5e094fffda5e| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscorecescf:30445987 vscod805cf:30301675 binariesv615:30325510 vsaa593:30376534 py29gd2263:30899288 c4g48928:30535728 azure-dev_surveyone:30548225 2i9eh265:30646982 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pyreplss1:30897532 pythonmypyd1:30879173 pythoncet0:30885854 2e7ec940:30986170 pythontbext0:30879054 accentitlementst:30887150 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfcontrol:30979541 d34g3935:30971562 fegfb526:30981948 bg6jg535:30979843 dsvsc020:30976470 ```
paulacamargo25 commented 5 months ago

This issue will be solved with the new testing proposal for arguments.

MichaelSquires commented 5 months ago

Hi @paulacamargo25, can you share a link to the referenced testing proposal? What's the timeline on that so we can know when to expect this issue to be resolved? Thanks!

gsavchuk commented 5 months ago

IMHO this setting is stupid. Why would I want to skip a breakpoint in a third party library if I set it up myself? There are no breakpoints by default.

MichaelSquires commented 5 months ago

IMHO this setting is stupid. Why would I want to skip a breakpoint in a third party library if I set it up myself? There are no breakpoints by default.

@gsavchuk This setting isn't just for breakpoints. It will skip over standard libraries when step debugging. It's extremely useful IMO because 99% of the time when I'm debugging, I don't want/need to step through the standard library.