Stencil: Add Source-Maps

Created on 29 Nov 2018  路  8Comments  路  Source: ionic-team/stencil

Stencil version:

 @stencil/[email protected]

I'm submitting a:

[] bug report
[X] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:
I'm using the stencil starter project found here (https://github.com/ionic-team/stencil-component-starter) and I would like to debug the code in visual studio code. The following configuration lets me launch chrome from within visual studio code:

"configurations": [
 {
  "type": "chrome",
  "request": "launch",
  "name": "Launch Chrome against localhost",
  "url": "http://localhost:3333",
  "sourceMaps": true,
  "webRoot": "${workspaceFolder}/www"
 }
]

Expected behavior:
When I place a breakpoint in visual studio code, I expect execution to stop there. This doesn't happen. Instead I get a warning saying 'unverified breakpoint' for all the breakpoints I place in the code.

enhancement stale issue

Most helpful comment

Just a bump for this.. seems like an important feature

All 8 comments

I have the same problem

See my answer on StackOverflow, specifically the part about source maps:

But since Stencil does not generate source maps yet you will only be able to debug the compiled code.
Source: https://github.com/ionic-team/stencil/issues/219

My method for finding the correct generated file is to just add a debugger; statement so that VS Code will automatically break.

any update on this? is it maybe also possible to debug unit tests / e2e tests?
edit: after playing around with some settings, i found out how to debug tests. It even maps the ts code correctly. Here is my configuration:

{
    "type": "node",
    "request": "launch",
    "name": "Test",
    "program": "${workspaceFolder}/node_modules/@stencil/core/bin/stencil",
    "args": [
        "test",
        "--spec",
        "--e2e",
        "--runInBand"
    ],
    "console": "integratedTerminal",
    "internalConsoleOptions": "neverOpen",
    "disableOptimisticBPs": true
}

Sourcemaps are something we plan to add to the roadmap. I will leave this issue open as the reference for implementing them.

Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Stencil, please create a new issue and ensure the template is fully filled out.

Thank you for using Stencil!

still no source-maps? 馃槶

Just a bump for this.. seems like an important feature

Thanks for the issue! This issue is being closed due to inactivity. If this is still an issue with the latest version of Stencil, please create a new issue and ensure the template is fully filled out.

Thank you for using Stencil!

Was this page helpful?
0 / 5 - 0 ratings