-
Notifications
You must be signed in to change notification settings - Fork 137
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
Support dealing with paths with inconsistent casing on Mac OS #1031
Comments
@sthz31 can you provide the logs for this? See: https://github.com/microsoft/debugpy/wiki/Enable-debugger-logs for details on how to collect the logs. |
@sthz31 there should be multiple generated files log files (usually 3, the most important for this case is the one related to You should be able to just drag and drop those while you're creating a comment in GitHub to attach them to this issue. Can you do that? |
The pydevd log above corresponds to the parent process of your app - the one that watches the filesystem and restarts the child process that actually runs your code. There should be another file named Also, can you share your debug configuration, and the startup file that sets up the Django app? I wonder if there's some settrace-related facility there that just overrides the debugger, like there is with Flask. |
update -> We reinstalled the python extension in VS code and issue has been cleared (along with all other trouble shooting steps below) Seeing the same issues here with our project. Notes that we have figured out: Below are the only 2 log files for pydevd shown up following the above wiki. |
I was checking the logs and the difference seems to be in how VSCode is sending the breakpoints to the debugger. In the case where it doesn't work it seems to be passing breakpoints with a case such as:
But the debugger/Python sees the paths as:
I'm not sure why VSCode is passing lowercase paths to the debugger (it should usually pass the paths with the proper case, so, this does seem like an issue on VSCode itself). We do deal with case-insensitivity on Windows (where it's very common for the drive letter to have a different case) but not for Mac/Linux, so, the fix here would be making the debugger work the same way with MacOS (the debugger needs to normalize internally to lowercase but when passing to the client convert it to the real case). One workaround to check would be checking if when you open the folder in VSCode you're opening it with the proper casing (maybe that could play a part there). Apparently Mac OS can be configured to be case-insensitive (default) or case-sensitive, so, the debugger should have a way to support it on Mac in the same way that it supports it on Windows. |
Thanks for the follow up -- In this particular case it may not be directly associated with VS code as the solution we figured out was buttoned up by uninstalling and reinstalling the python extension in VS code. |
Well, it's VSCode that passes the files to the debugger (not vscode-python), so, the issue could've been indirectly fixed just by restarting VSCode (perhaps it got into a weird situation) or just opening the folder again with the proper casing... (this is actually the 2nd report regarding that -- the other #679 also was magically fixed... I believe it has something to do with how VSCode is seeing the folder, but given that Mac OS is case independent the debugger should work properly even in that case). |
Got it -- We did do multiple computer restarts and multiple VS code restarts (killing the proccess and all) -- Not sure if there is any caching in the exchange of VS->python that was erased when the extension was uninstalled. I will continue to follow to offer any assistance in our example as needed. File structure wise -- we were able to debug other files in the same path File1 failed debug file 2 was fine. |
Type: Bug
VS Code Version: 1.70.2 (Universal)
OS Version: MacOS (M1)
Python Extension Version: v2022.12.1
Pylance Extension Version: v2022.8.40
Python Version: 3.10
Steps to Reproduce:
Open the django project.
Create lunch.json file for django
Run the debugger.
Keep breakpoins
Does't stop in Breakpoint.
Extension version: 2022.12.1
VS Code version: Code 1.70.2 (Universal) (e4503b30fc78200f846c62cf8091b76ff5547662, 2022-08-16T05:36:37.829Z)
OS version: Darwin arm64 21.6.0
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: