Skip to content
This repository has been archived by the owner on Oct 2, 2021. It is now read-only.

Commit

Permalink
Fix un-sourcemapped frames being shown as 'smartStep' even when it's …
Browse files Browse the repository at this point in the history
…not enabled
  • Loading branch information
roblourens committed Jan 15, 2017
1 parent 3526b95 commit d7d8433
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/chrome/chromeDebugAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,7 @@ export abstract class ChromeDebugAdapter implements IDebugAdapter {
} else if (expectingStopReason) {
// If this was a step, check whether to smart step
reason = expectingStopReason;
if (this._launchAttachArgs.smartStep) {
smartStepP = this.shouldSmartStep(this._currentStack[0]);
}
smartStepP = this.shouldSmartStep(this._currentStack[0]);
} else {
reason = 'debugger';
}
Expand Down Expand Up @@ -405,7 +403,7 @@ export abstract class ChromeDebugAdapter implements IDebugAdapter {
}

private async shouldSmartStep(frame: Crdp.Debugger.CallFrame): Promise<boolean> {
if (!this._launchAttachArgs.sourceMaps) return Promise.resolve(false);
if (!this._launchAttachArgs.sourceMaps || !this._launchAttachArgs.smartStep) return Promise.resolve(false);

const stackFrame = this.callFrameToStackFrame(frame);
const clientPath = this._pathTransformer.getClientPathFromTargetPath(stackFrame.source.path) || stackFrame.source.path;
Expand Down

0 comments on commit d7d8433

Please sign in to comment.