Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Attempt workaround for microsoft/vscode#60187
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Nov 13, 2018
1 parent 19cb40c commit c9feb12
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions package.json
Expand Up @@ -366,6 +366,11 @@
"type": "boolean",
"description": "%node.enableSourceMapCaching.description%",
"default": true
},
"_disableOptimisticBPs": {
"type": "boolean",
"description": "Don't set breakpoints in any file until a sourcemap has been loaded for that file.",
"default": true
}
}
},
Expand Down Expand Up @@ -481,6 +486,11 @@
"type": "boolean",
"description": "%node.enableSourceMapCaching.description%",
"default": true
},
"_disableOptimisticBPs": {
"type": "boolean",
"description": "Don't set breakpoints in any file until a sourcemap has been loaded for that file.",
"default": true
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/nodeDebugAdapter.ts
Expand Up @@ -705,7 +705,7 @@ export class NodeDebugAdapter extends ChromeDebugAdapter {

protected validateBreakpointsPath(args: ISetBreakpointsArgs): Promise<void> {
return super.validateBreakpointsPath(args).catch(e => {
if (args.source.path && utils.isJavaScript(args.source.path)) {
if (!this._launchAttachArgs._disableOptimisticBPs && args.source.path && utils.isJavaScript(args.source.path)) {
return undefined;
} else {
return Promise.reject(e);
Expand Down
3 changes: 3 additions & 0 deletions src/nodeDebugInterfaces.d.ts
Expand Up @@ -17,6 +17,9 @@ export interface ICommonRequestArgs extends Core.ICommonRequestArgs {
cwd?: string;
/** Request frontend to restart session on termination. */
restart?: boolean;

/** Don't set breakpoints in JS files that don't have sourcemaps */
_disableOptimisticBPs?: boolean;
}

/**
Expand Down

0 comments on commit c9feb12

Please sign in to comment.