Skip to content

Conversation

@lionel-
Copy link
Contributor

@lionel- lionel- commented Jan 27, 2026

Addresses posit-dev/positron#11558

This fixes two issues:

  • We were passing file URIs to normalizePath(). On Unix this is fine, it doesn't find the path on disk and so returns the input since mustWork is FALSE:

    normalizePath("file:///home/user/test.R", mustWork = FALSE)
    #> [1] "file:///home/user/test.R"

    But on Windows this produces paths like C:\Users\lione\Projects\dplyr\file:\C:\Users\lione\OneDrive\Desktop\test.R

    To fix this, we detect all URIs rather than just Ark ones.

  • On Windows, Positron sends encoded file URIs via to the LSP server and via execute-request code locations which look like c%03 instead of C:. These URIs didn't match the ones we constructed from file paths in the DAP. To fix this, we now normalise the URIs coming from the LSP (did change events for breakpoint invalidation) and from execute requests (so cmd+enter may validate breakpoints).

    Ideally we'd sanitize all URIs at the DAP/LSP/Jupyter boundaries to a common encoding, but such a large change felt too risky at this point. We will be able to do this when we introduce the notion of a FileId.

Screen.Recording.2026-01-27.at.18.53.47.mov

@lionel- lionel- force-pushed the bugfix/breakpoints-windows branch from 9600a40 to 3b478f0 Compare January 28, 2026 17:18
@lionel- lionel- merged commit 6f8acef into main Jan 28, 2026
8 checks passed
@lionel- lionel- deleted the bugfix/breakpoints-windows branch January 28, 2026 17:28
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants