Skip to content
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

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

Closed
andrewcrawley opened this issue Jul 25, 2017 · 4 comments
Closed

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

andrewcrawley opened this issue Jul 25, 2017 · 4 comments
Assignees

Comments

@andrewcrawley
Copy link
Contributor

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: @weinand @richardstanton @gregg-miskelly @digeff @roblourens

@roblourens
Copy link
Member

roblourens commented Jul 25, 2017

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?

@digeff
Copy link

digeff commented Jul 26, 2017

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.

@roblourens
Copy link
Member

roblourens commented Jul 26, 2017

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.

@andrewcrawley
Copy link
Contributor Author

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
Projects
None yet
Development

No branches or pull requests

4 participants