File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,20 @@ export class SourceMapTransformer implements IDebugTransformer {
4545 this . _authoredPathsToMappedBPLines = new Map < string , number [ ] > ( ) ;
4646 this . _authoredPathsToMappedBPCols = new Map < string , number [ ] > ( ) ;
4747 }
48+
49+ let stringProto : any = String . prototype ;
50+ if ( ! stringProto . endsWith )
51+ {
52+ stringProto . endsWith = function ( str )
53+ {
54+ var lastIndex = this . lastIndexOf ( str ) ;
55+ return ( lastIndex !== - 1 ) && ( lastIndex + str . length === this . length ) ;
56+ }
57+ }
4858 }
4959
60+
61+
5062 public clearTargetContext ( ) : void {
5163 this . _allRuntimeScriptPaths = new Set < string > ( ) ;
5264 }
@@ -56,7 +68,7 @@ export class SourceMapTransformer implements IDebugTransformer {
5668 */
5769 public setBreakpoints ( args : ISetBreakpointsArgs , requestSeq : number ) : Promise < void > {
5870 return new Promise < void > ( ( resolve , reject ) => {
59- if ( this . _sourceMaps && args . source . path ) {
71+ if ( this . _sourceMaps && args . source . path && path . extname ( args . source . path ) !== ".js" ) {
6072 const argsPath = args . source . path ;
6173 const mappedPath = this . _sourceMaps . MapPathFromSource ( argsPath ) ;
6274 if ( mappedPath ) {
You can’t perform that action at this time.
0 commit comments