Skip to content

URL escaping is changed when using "Loaded Scripts" viewlet #33712

Closed

Description

@roblourens

chrome-debug sends {"seq":0,"type":"event","event":"script","body":{"reason":"new","script":{"id":11,"source":{"name":"test2.js","path":"http://localhost:8080/out/client%20with%20space/test2.js","sourceReference":1001}}}} (with %20 escaped spaces)

I open test2.js from "loaded scripts" and set a breakpoint in it. VS Code sends setBreakpoints({"source":{"path":"http://localhost:8080/out/client with space/test2.js","name":"test2.js"},"lines":[3],"breakpoints":[{"line":3}],"sourceModified":false}) (with unescaped spaces)

Activity

  1. added
    debug
    on Sep 1, 2017
  2. isidorn commented on Sep 4, 2017

    @isidorn

    roblourens can you please put a breakpoint here and check if the normalize call is removing escape codes.

    An alternative would be that our internal uri implementation somehow removes escape code.

    Also assigning to Andre Weinand (@weinand) since he is aware that some loaded scripts paths get incorectly transformed on windows

  3. added
    info-needed
    on Sep 4, 2017
  4. roblourens commented on Sep 5, 2017

    @roblourens
    MemberAuthor

    It's from URI, the 'path' goes through decodeURIComponent https://github.com/Microsoft/vscode/blob/master/src/vs/base/common/uri.ts#L189

    I think it's hard to store a URI inside another URI and get the exact same representation out, because it will always be transformed in some way.

  5. isidorn commented on Sep 6, 2017

    @isidorn

    True, I do not see a straighforward way to fix this since we use uri everywhere inernally.
    I am open for suggestions on how to fix this

  6. weinand commented on Sep 6, 2017

    @weinand
    Contributor

    I'll investigate...

  7. deleted a comment from vscodebot on Sep 13, 2017
  8. weinand commented on Sep 16, 2017

    @weinand
    Contributor

    duplicate of #23194

  9. added
    *duplicate
    on Sep 18, 2017
  10. removed
    info-needed
    on Sep 25, 2017
  11. locked and limited conversation to collaborators on Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*duplicatedebug

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions