File tree 1 file changed +13
-1
lines changed
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 {
45
45
this . _authoredPathsToMappedBPLines = new Map < string , number [ ] > ( ) ;
46
46
this . _authoredPathsToMappedBPCols = new Map < string , number [ ] > ( ) ;
47
47
}
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
+ }
48
58
}
49
59
60
+
61
+
50
62
public clearTargetContext ( ) : void {
51
63
this . _allRuntimeScriptPaths = new Set < string > ( ) ;
52
64
}
@@ -56,7 +68,7 @@ export class SourceMapTransformer implements IDebugTransformer {
56
68
*/
57
69
public setBreakpoints ( args : ISetBreakpointsArgs , requestSeq : number ) : Promise < void > {
58
70
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" ) {
60
72
const argsPath = args . source . path ;
61
73
const mappedPath = this . _sourceMaps . MapPathFromSource ( argsPath ) ;
62
74
if ( mappedPath ) {
You can’t perform that action at this time.
0 commit comments