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): Breakpoints could get overwritten when multiple TS files map to a single JS file. #285

Merged
merged 3 commits into from
Jan 28, 2025
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
pr feedback
  • Loading branch information
chmeyer-ms committed Jan 28, 2025

Verified

This commit was signed with the committer’s verified signature.
misak113 Michael Zabka
commit 341305d05e6ef339d1cefb73391492667ed7d35e
6 changes: 3 additions & 3 deletions src/session.ts
Original file line number Diff line number Diff line change
@@ -47,19 +47,19 @@

interface PluginDetails {
name: string;
module_uuid: string;

Check warning on line 50 in src/session.ts

GitHub Actions / Build and Test

Type Property name `module_uuid` must match one of the following formats: camelCase
}

interface ProtocolCapabilities {
type: string;
version: number;
plugins: PluginDetails[];
require_passcode?: boolean;

Check warning on line 57 in src/session.ts

GitHub Actions / Build and Test

Type Property name `require_passcode` must match one of the following formats: camelCase
}

interface ProfilerCapture {
type: string;
capture_base_path: string;

Check warning on line 62 in src/session.ts

GitHub Actions / Build and Test

Type Property name `capture_base_path` must match one of the following formats: camelCase
capture_data: string;
}

@@ -359,7 +359,7 @@
for (let [sourcePath, sourceBreakpoints] of this._sourceBreakpointsMap) {
let originalLocalAbsolutePath = path.normalize(sourcePath);

const originalBreakpoints = sourceBreakpoints || [];
const originalBreakpoints = sourceBreakpoints ?? [];
let generatedRemoteLocalPath = undefined;

try {
@@ -379,11 +379,11 @@
for (let originalBreakpoint of originalBreakpoints) {
const generatedPosition = await this._sourceMaps.getGeneratedPositionFor({
source: originalLocalAbsolutePath,
column: originalBreakpoint.column || 0,
column: originalBreakpoint.column ?? 0,
line: originalBreakpoint.line,
});
generatedBreakpoints.push({
line: generatedPosition.line || 0,
line: generatedPosition.line ?? 0,
column: 0,
});
}
Loading