Skip to content

Commit 0037a5c

Browse files
srujzsCommit Queue
authored andcommitted
[ddc] Add getSourceMap debugger API to dartDevEmbedder
This is used in bootstrappers to set a source map provider within stack_trace_mapper.dart so that stack traces can be mapped to their Dart equivalent. Change-Id: If7dd7024cf8928f1b3a127599015107fcbafb2f4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/405245 Reviewed-by: Nicholas Shahan <[email protected]> Auto-Submit: Srujan Gaddam <[email protected]> Commit-Queue: Srujan Gaddam <[email protected]>
1 parent ed209fb commit 0037a5c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pkg/dev_compiler/lib/js/ddc/ddc_module_loader.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,6 +1927,16 @@ if (!self.deferred_loader) {
19271927
stackTrace(error) {
19281928
return dartRuntimeLibrary().stackTrace(error).toString();
19291929
}
1930+
1931+
/**
1932+
* Returns the source map path for a given Dart file, if one was registered.
1933+
*
1934+
* @param {String} url The path of a Dart file.
1935+
* @returns {?String} The associated source map location if one exists.
1936+
*/
1937+
getSourceMap(url) {
1938+
return dartRuntimeLibrary().getSourceMap(url);
1939+
}
19301940
}
19311941

19321942
const debugger_ = new Debugger();

0 commit comments

Comments
 (0)