Skip to content

Add Source-Maps #1744

Closed
Closed

Description

@tricki

Repost of automatically closed issue #1255

Identical issues:

Stencil version:

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.

Steps to reproduce:
See Current behavior and Expected behavior

Main advantages of having source maps

  • Editor integration
  • IE11 debugging

Activity

  1. tricki commented on Jul 18, 2019

    @tricki
    ContributorAuthor

    BTW I find it strange that issues are being closed simply because there has been no activity for a month. Or was the issue template not "fully filled out"?

    Perhaps you should reprogram your ionitron-bot 😉
    What about an early warning to all subscribers?

    And I do understand if it's not a priority for you but I still think the issue should have stayed open.

  2. iano123 commented on Aug 14, 2019

    @iano123

    +1

  3. petermikitsh commented on Aug 30, 2019

    @petermikitsh
    Contributor
  4. gino8080 commented on Nov 7, 2019

    @gino8080

    and the roadmap is..Stopped?

  5. arjunyel commented on Nov 8, 2019

    @arjunyel
    Contributor

    Right now the compiler is being rewritten to support environments like Stackblitz

  6. hypery2k commented on Jan 11, 2020

    @hypery2k

    any news on this?

  7. lhk commented on Feb 12, 2020

    @lhk

    From https://stenciljs.com/blog/stencil-roadmap-fall-2019

    One major benefit of using native JavaScript modules and imports is that the original source code is largely left untouched. Granted, TypeScript removes the types and Stencil removes the decorators, but the developer’s original source code is largely as-is.

    I don't think that this is true. The bundler will mix lots of Javascript code together. I just worked my way through a long Stenciljs tutorial and saw huge bundles with functionality from components, services and helpers all mixed together. The original typescript code was basically unrecognizable.

    To be honest, without support for sourcemaps, I can't consider stenciljs for professional development.

  8. lhk commented on Mar 25, 2020

    @lhk

    Also, for what it's worth, sourcemaps >>> stackblitz

  9. lhk commented on May 4, 2020

    @lhk

    any update on this?

  10. lhk commented on Jun 25, 2020

    @lhk

    I would like to bump this again.

    When using Stencil to build small, self-contained web-components, the lack of sourcemaps is probably not a big issue.

    But design systems tend to grow and develop complex interlocking dependencies. At this point reading the code generated by the bundler becomes very hard.

    And you advertise StencilJS as a tool for building entire applications. This takes it even one step further.
    I've tried porting parts of my React App to Stencil. The output is a mess! It contains code from all over the place: Services, tools, backend logic, etc.
    It's not that my code is badly organized, it's just the bundler doing its job.
    At some level of application complexity, Javascript as a compilation target should no longer be considered human-readable.
    I mean, sure, you can read this. But it's not productive.

    Personal opinion: Developing a medium to large app without sourcemaps is a really bad idea. Stencil is currently only suitable for very small codebases of self-contained web-components.

  11. basisbit commented on Jun 25, 2020

    @basisbit

    +1

  12. LukePammant commented on Jun 26, 2020

    @LukePammant

    I'll go ahead and weigh in on this too. I'm trying to pitch web-components to my company using StencilJS but the lack of source maps is going to be a non-starter to get the other developers on board. I love developing with StencilJS but I hate having to use the archaic debug; or console.log lines to try to troubleshoot issues.

  13. carl-ellis commented on Jul 14, 2020

    @carl-ellis

    👍 With source maps we can integrate with Sentry. Any news on if this is scheduled for work in an upcoming release?

  14. 48 remaining items

  15. added
    Feature: Want this? Upvote it!
    on Aug 10, 2021
  16. splitinfinities commented on Oct 12, 2021

    @splitinfinities
    Contributor
  17. wbern commented on Oct 18, 2021

    @wbern

    Using it now, fantastic! Thanks so much everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: Want this? Upvote it!

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions