Au-cli problem with sourcemap paths

I’m using aurelia-cli 1.0.1, alameda with vscode and aspnet core.

I can’t set breakpoints within VS Code, because the source maps are adding extra paths as below:

I’m sure its something to do with my configuration in aurelia.json and have tried all kinds of variations for build.targets and platform all without any success.

I can set breakpoints inside Chrome. The screenshot shows how the parent directory is being inserted into the child directory paths.

The root of the project (where .csproj and package.json are located) is c:\Visual Studio\Latinha\Latinha - not as it says in app-bundle.js.

Many thanks in advance for any suggestions

https://localhost:5001/scripts/app-bundle.js
    - ../../src/app.ts (c:\Visual Studio\Latinha\src\app.ts)
    - ../../src/app.html (c:\Visual Studio\Latinha\src\app.html)
    - ../../src/authConfig.ts (c:\Visual Studio\Latinha\src\authConfig.ts)
    - ../../src/core/core/array-functions.ts (c:\Visual Studio\Latinha\src\core\core\array-functions.ts)
    - ../../src/core/core/constants.ts (c:\Visual Studio\Latinha\src\core\core\constants.ts)
    - ../../src/core/core/custom-error.ts (c:\Visual Studio\Latinha\src\core\core\custom-error.ts)
    - ../../src/core/core/guid.ts (c:\Visual Studio\Latinha\src\core\core\guid.ts)
    - ../../src/core/core/helpers.ts (c:\Visual Studio\Latinha\src\core\core\helpers.ts)
    - ../../src/core/core/log.ts (c:\Visual Studio\Latinha\src\core\core\log.ts)
    - ../../src/core/core/types.ts (c:\Visual Studio\Latinha\src\core\core\types.ts)
    - ../../src/environment.ts (c:\Visual Studio\Latinha\src\environment.ts)
    - ../../src/events/events/language-changed-event.ts (c:\Visual Studio\Latinha\src\events\events\language-changed-event.ts)
    - ../../src/interfaces/interfaces/IAppUser.ts (c:\Visual Studio\Latinha\src\interfaces\interfaces\IAppUser.ts)
    - ../../src/interfaces/interfaces/IBaseFetchService.ts (c:\Visual Studio\Latinha\src\interfaces\interfaces\IBaseFetchService.ts)
    - ../../src/interfaces/interfaces/IEntity.ts (c:\Visual Studio\Latinha\src\interfaces\interfaces\IEntity.ts)
    - ../../src/interfaces/interfaces/IFetchRoute.ts (c:\Visual Studio\Latinha\src\interfaces\interfaces\IFetchRoute.ts)
    - ../../src/interfaces/interfaces/IImageInfo.ts (c:\Visual Studio\Latinha\src\interfaces\interfaces\IImageInfo.ts)
    - ../../src/interfaces/interfaces/IImageListItem.ts (c:\Visual Studio\Latinha\src\interfaces\interfaces\IImageListItem.ts)

aurelia.json

{
  "name": "AtlCashflow",
  "type": "project:application",
  "bundler": {
    "id": "cli",
    "displayName": "Aurelia-CLI"
  },
  "httpProtocol": {
    "id": "http1",
    "displayName": "HTTP/1.1"
  },
  "build": {
    "targets": [
      {
        "id": "aspnetcore",
        "displayName": "ASP.NET Core",
        "port": 5000,
        "index": "wwwroot/index.html",
        "baseDir": "./wwwroot",
        "baseUrl": "scripts",
        "output": "wwwroot/scripts"
      }
    ],
    "options": {
      "minify": "stage & prod",
      "sourcemaps": "dev & stage",
      "rev": false,
      "cache": "dev & stage"
    },
    "bundles": [
      {
        "name": "app-bundle.js",
        "source": [
          "**/*.{js,json,css,html}"
        ]
      },
      {
        "name": "vendor-bundle.js",
        "prepend": [
          "node_modules/bluebird/js/browser/bluebird.core.js",
          {
            "path": "node_modules/aurelia-cli/lib/resources/scripts/configure-bluebird-no-long-stacktraces.js",
            "env": "stage & prod"
          },
          {
            "path": "node_modules/aurelia-cli/lib/resources/scripts/configure-bluebird.js",
            "env": "dev"
          },
          "node_modules/@babel/polyfill/browser.js",
          "node_modules/alameda/alameda.js"
        ],
        "dependencies": [
          "aurelia-bootstrapper",
          "aurelia-loader-default",
          "aurelia-pal-browser",
          {
            "name": "aurelia-testing",
            "env": "dev"
          },
          "text"
        ]
      }
    ],
    "copyFiles": {
      "src/locales/en/*": "wwwroot/locales/en",
      "src/locales/fr/*": "wwwroot/locales/fr",
      "node_modules/@fortawesome/fontawesome-pro/webfonts/*": "wwwroot/@fortawesome/fontawesome-pro/webfonts"
    },
    "loader": {
      "type": "require",
      "configTarget": "vendor-bundle.js",
      "includeBundleMetadataInConfig": "auto",
      "plugins": [
        {
          "name": "text",
          "extensions": [
            ".html",
            ".css"
          ],
          "stub": true
        }
      ]
    }
  },
  "platform": {
    "id": "aspnetcore",
    "displayName": "ASP.NET Core",
    "port": 9000,
    "index": "wwwroot/index.html",
    "baseDir": "./wwwroot",
    "baseUrl": "scripts",
    "output": "wwwroot/scripts"
  },
  "transpiler": {
    "id": "typescript",
    "displayName": "TypeScript",
    "fileExtension": ".ts",
    "dtsSource": [
      "./custom_typings/**/*.d.ts"
    ],
    "source": "src/**/*.ts"
  },
  "markupProcessor": {
    "id": "none",
    "displayName": "None",
    "fileExtension": ".html",
    "source": "src/**/*.html"
  },
  "cssProcessor": {
    "id": "none",
    "displayName": "None",
    "fileExtension": ".css",
    "source": "src/**/*.css"
  },
  "jsonProcessor": {
    "id": "none",
    "displayName": "None",
    "fileExtension": ".json",
    "source": "src/**/*.json"
  },
  "editor": {
    "id": "vscode",
    "displayName": "Visual Studio Code"
  },
  "features": {},
  "unitTestRunner": {
    "id": "jest",
    "displayName": "Jest",
    "source": "test/unit/**/*.ts"
  },
  "integrationTestRunner": {
    "id": "none",
    "displayName": "None"
  },
  "paths": {
    "root": "src",
    "resources": "resources",
    "elements": "resources/elements",
    "attributes": "resources/attributes",
    "valueConverters": "resources/value-converters",
    "bindingBehaviors": "resources/binding-behaviors"
  },
  "testFramework": {
    "id": "jasmine",
    "displayName": "Jasmine"
  },
  "packageManager": "yarn"
}

‘tsconfig.json’

{
  "compileOnSave": false,
  "compilerOptions": {
    "target": "es5",
    "module": "amd",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "esModuleInterop": true,
    "resolveJsonModule": true,
    "moduleResolution": "node",
    "sourceRoot": "src",
    "sourceMap": true,
    "allowJs": true,
    "baseUrl": "src",
    "skipLibCheck": true,
    "lib": [
      "es2017",
      "dom"
    ]
  },
  "include": [
    "./src/**/*.ts",
    "./test/**/*.ts",
    "./custom_typings/**/*.d.ts"
  ],
  "atom": {
    "rewriteTsconfig": false
  }
}

launch.json

{
  // Use IntelliSense to find out which attributes exist for C# debugging
  // Use hover for the description of the existing attributes
  // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
  "version": "0.2.0",
  "configurations": [
    {
      "type": "chrome",
      "request": "launch",
      "name": "Launch Chrome",
      "url": "https://localhost:5001",
      "webRoot": "${workspaceFolder}/src",
      "userDataDir": "${workspaceRoot}/.chrome",
      "sourceMaps": true,
      "breakOnLoad": true,
      "preLaunchTask": "au build watch",
      "smartStep": false,
      "sourceMapPathOverrides": {
        "webpack:///./*": "${webRoot}/*",
        "webpack:///src/*": "${webRoot}/*",
        "webpack:///*": "*",
        "webpack:///./~/*": "${webRoot}/node_modules/*",
        "meteor://💻app/*": "${webRoot}/*",
        "*": "${webRoot}/*"
      }
    },
    {
      "name": ".NET Core Launch (web)",
      "type": "coreclr",
      "request": "launch",
      "preLaunchTask": "build",
      // If you have changed target frameworks, make sure to update the program path.
      "program": "${workspaceFolder}/bin/Debug/netcoreapp2.2/Latinha.dll",
      "args": [],
      "cwd": "${workspaceFolder}",
      "env": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    },
    {
      "name": ".NET Core Attach",
      "type": "coreclr",
      "request": "attach",
      "processId": "${command:pickProcess}"
    },
    {
      "type": "node",
      "request": "launch",
      "name": "Debug Jest Tests",
      "cwd": "${workspaceFolder}",
      "args": [
        "--inspect-brk",
        "${workspaceRoot}/node_modules/.bin/jest",
        "--runInBand"
      ],
      "windows": {
        "args": [
          "--inspect-brk",
          "${workspaceRoot}/node_modules/jest/bin/jest.js",
          "--runInBand"
        ],
      },
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen"
    }
  ]
}

1 Like

The bug is going to be fixed in coming patch release.


1 Like

Great thanks. I thought it was me!

1 Like