Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jasmine requires pathMapping that isn't being set automatically #21

Closed
mattalxndr opened this issue Jan 21, 2022 · 2 comments
Closed

Jasmine requires pathMapping that isn't being set automatically #21

mattalxndr opened this issue Jan 21, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@mattalxndr
Copy link

mattalxndr commented Jan 21, 2022

Is Your Feature Request related to a Problem? Please Describe

  • Jasmine tests require /base/* URLs be mapped to the project root. Otherwise breakpoints don't work while debugging because the runtime can't find the correct sources.

Describe the Solution You'd Like

  • Considering this extension has other auto-detection happening, this seems like a missing feature. I know I would have saved some time.

Describe Alternatives You've Considered

  • Adding this configuration:
"karmaTestExplorer.debuggerConfig": {
    "name": "Karma Test Explorer Debugging",
    "type": "pwa-chrome",
    "request": "attach",
    "browserAttachLocation": "workspace",
    "address": "localhost",
    "port": 9222,
    "timeout": 60000,
    "webRoot": "${workspaceRoot}",
    "pathMapping": {
      "/base": "${workspaceFolder}",
      "/base/test": "${workspaceFolder}/test",
    },  
  },

Additional Context

  • Add any other context or screenshots about the feature request here.
@mattalxndr mattalxndr added the enhancement New feature or request label Jan 21, 2022
@mattalxndr mattalxndr changed the title Jasmine requires launchConfig that isn't being set Jasmine requires pathMapping that isn't being set automatically Jan 21, 2022
@lucono
Copy link
Owner

lucono commented Jan 28, 2022

@mattalexx If you'd like to propose an approach, and submit a PR that can provide automatic, accurate path mappings that would work cleanly for any project, I'd be willing to review and release it.

But in v0.5.0, there are also now direct karmaTestExplorer. (webRoot | pathMapping | sourceMapPathOverrides) settings to more easily provide these mappings without necessarily having to also specify all the other debuggerConfig properties.

So you can replace your existing karmaTestExplorer.debuggerConfig setting with just:

"karmaTestExplorer.pathMapping": {
    "/base": "${workspaceFolder}",
    "/base/test": "${workspaceFolder}/test",
}

@lucono
Copy link
Owner

lucono commented Feb 15, 2022

@mattalexx Closing this - please re-open if needed.

@lucono lucono closed this as completed Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants