0

I am running a C# app, using Typescript with gulpfile to provide the file to wwwroot

gulp.task('typescript', function () {
return gulp.src(paths.typescriptSrc, {sourcemaps : true})
    .pipe(tsProject().on('error', swallowError))
    .pipe(relativeSourcemapsSource({dest: paths.webroot + "js/"}))
    .pipe(gulp.dest(paths.webroot + "js/", {sourcemaps : '.'}));

which looks OK, it's producing map and js files to wwwroot, with map file 'sources' arugment set to ["..\\src\\typescript\\file.ts"] and js file having //# sourceMappingURL=file.js.map comment. However, the breakpoints do not seem to work. Or Rather, when the sources argument is ..\\src\\typescript\\file.ts, it works (I can debug file.ts in src/typescript folder, but if it is in wwwroot/js subfolder and the sources argument is ..\\..\\src\\typescript\\file.ts (one lower), it doesnt work. I just don't know where to go from here, and maybe I'm not providing enough info for it. I have put file server info to the c sharp Startup.cs:

      if (env.IsDevelopment())
        {
            app.UseFileServer(new FileServerOptions()
            {
                FileProvider = new PhysicalFileProvider(env.ContentRootPath),
            });

and this executes fine

Has anybody built experienced this? Can I provide more details?

shredder
  • 85
  • 1
  • 10

0 Answers0