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

fix: breakpoints not registered in transpiled file in remoteRoot #2145

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This changelog records changes to stable releases since 1.50.2. "TBA" changes he

## Nightly (only)

- fix: breakpoints not registered in transpiled file in remoteRoot ([#2122](https://github.com/microsoft/vscode-js-debug/issues/2122))
- fix: content verification of files in Node.js failing with UTF-8 BOM
- fix: extraneous threads continued event during shutdown at bp

## v1.96 (November 2024)

- fix: performance degredation of repeated variable calls ([#2120](https://github.com/microsoft/vscode-js-debug/issues/2120))
Expand Down
2 changes: 1 addition & 1 deletion src/targets/node/nodeSourcePathResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class NodeSourcePathResolver extends SourcePathResolverBase<IOptions> {
}

if (urlUtils.isFileUrl(url)) {
return urlUtils.fileUrlToAbsolutePath(url);
return this.rebaseRemoteToLocal(urlUtils.fileUrlToAbsolutePath(url));
}

if (!path.isAbsolute(url) && this.options.basePath) {
Expand Down
21 changes: 21 additions & 0 deletions src/test/node/node-source-path-resolver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,27 @@ describe('node source path resolver', () => {
);
});

it('applies rebase to file URIs (#2122)', async () => {
const resolver = new NodeSourcePathResolver(fsUtils, undefined, {
...defaultOptions,
localRoot: '/biz',
remoteRoot: '/foo',
}, Logger.null);

const result = await resolver.urlToAbsolutePath({
url: 'file:///foo/bar/baz.ts',
map: {
metadata: {
sourceMapUrl: 'file:///foo/bar/baz/my.map.js',
compiledPath: 'file:///foo/bar/baz/my.map.js',
},
sourceRoot: '',
} as any,
});

expect(result).to.equal('/biz/bar/baz.ts');
});

describe('source map filtering', () => {
const testTable = {
'matches paths': {
Expand Down
Loading