How to use source-map-support

Comprehensive source-map-support code examples:

How to use source-map-support.install:

67
68
69
70
71
72
73
74
75
76
install() {
  if (sourceMapManager.isInstalled) {
    return;
  }
  sourceMapManager.isInstalled = true;
  sourceMapSupport.install({
    handleUncaughtExceptions: true,
    environment: 'node',
    retrieveSourceMap(filename) {
      const map = sourceMapManager.maps && sourceMapManager.maps[filename];

How to use source-map-support.wrapCallSite:

127
128
129
130
131
132
133
134
135
136
137
    return { map: parsedSourceMaps[pathForSourceMap] };
  }
  return null;
}


var origWrapper = sourcemap_support.wrapCallSite;
var wrapCallSite = function (frame) {
  var frame = origWrapper(frame);
  var wrapGetter = function (name) {
    var origGetter = frame[name];