microsoft / microsoft/vscode-js-debug

SourceRoot not Considered as Absolute Path

Open
#1,424 5 comments 0 reactions 1 assignee View on GitHub

@connor4312 is already working on this.

Since Oct 10, 2022.

feature-request good first issue
Dominant language
TypeScript
Stars
2k
Forks
373
Avg merge
1d 9m
Merged PRs (30d)
6

Description

Describe the bug

Here is a small sample repo.

We try to use the sourceRoot to add the sources in a remote location so that we do not need to ship them. However, the mapping:

{"version":3,"file":"string.js","sourceRoot":"http:/raw.githubusercontent.com/SAP/cloud-sdk-js/main/packages/util/src/","sources":["string.ts"],"names":[],"mappings":";......"}

leads to an error because the CWD is added in front of the source route.

To Reproduce

  • Checkout repo.
  • Run install
  • Execute debug-test.mjs via launch.json
  • Step into method -> see the Error

Could not load source '/Users/XXX/source-map-test/node_modules/@sap-cloud-sdk/util/dist/http:/raw.githubusercontent.com/SAP/cloud-sdk-js/main/packages/util/src/string.ts': Unable to retrieve source content.

VS Code Version: 1.72.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.