Skip to content

Debug Protocol: Add a "url" field to "source" objects #125

Closed

Description

We'd like to add a url field to Source objects to support more advanced mappings from url to local file that VS can perform based on project system information while debugging JS running in a browser.

Proposal:

export interface Source {
    // ...

    /** The URL of the source, if available. */
    url?: string;

    // ...
}

We'd prefer a separate field rather than re-using the path field so that debug adapters can continue to support their own source mapping mechanisms while still allowing the host to do more advanced mapping if available.

Namedrops: Andre Weinand (@weinand) Richard Stanton (@richardstanton) Gregg Miskelly (@gregg-miskelly) digeff roblourens

Activity

  1. roblourens commented on Jul 25, 2017

    @roblourens
    Member

    Can you tell me more about what additional info you get from the project system? Can this info be encoded in the launch config via pathMapping and sourceMapPathOverrides (in vscode-chrome-debug-core), so the adapter can do the mapping?

  2. digeff commented on Jul 26, 2017

    @digeff

    There might be virtual directories, bundles, minified files, symbolic links, and all kind of features that can make the mapping very complex. Some of these features can be language/library/framework specific too.

  3. roblourens commented on Jul 26, 2017

    @roblourens
    Member

    The adapter typically has to handle those things anyway, and I'd like to make it work in all scenarios, rather than bypass it, when possible.

    I've mostly avoided too many framework-specific adjustments, except for some tweaks to handle webpack and meteor-specific sourcemap paths.

  4. andrewcrawley commented on Aug 11, 2017

    @andrewcrawley
    ContributorAuthor

    Rob informed us that it's already possible to configure the adapter to return urls, so I don't think we need this. Diego is going to test that out, and I'll re-open the issue if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions