Skip to content

Request: hit breakpoints in browser dev tools #425

Closed

Description

@BrainCrumbz
  • I'm submitting a ...
    [ ] bug report
    [x] feature request
    [ ] question about the decisions made in the repository
  • Do you want to request a feature or report a bug?
    When serving in development mode (npm start), one can open browser on http://localhost:3000/. When setting a breakpoint, e.g. in home.ts, and reloading page, execution should pause on that line.
  • What is the current behavior?
    Breakpoint seems to be ignored. Execution proceeds beyond that. Client app runs normally, no particular errors.
  • What is the expected behavior?
    Execution should pause on breakpoint set.
  • What is the motivation / use case for changing the behavior?
    Debugging purposes.
  • Please tell us about your environment:
  • HEAD: 9736a48
  • Angular version: 2.0.0-beta.9
  • Browser: [Chrome 49.0.2623.87 m | Firefox 45.0]

Activity

  1. dvulanov commented on Mar 21, 2016

    @dvulanov

    +1

    Breakpoints don't work in constructors or event hooks (like OnInit, AfterViewInit, etc...). For me, they do work during regular method callbacks.

    If a new non-event lifecycle breakpoint is not being hit, refresh the page and it should.

    (using beta 9 and Chrome dev tools)

  2. samvloeberghs commented on Mar 23, 2016

    @samvloeberghs
    Contributor

    same here, using the new setup, my breakpoints are not working anymore. Perhaps something to do with the sourcemaps implementation used?

  3. BrainCrumbz commented on Mar 23, 2016

    @BrainCrumbz
    Author

    We definitely found some differences with sourcemap. Initially we tried with devtool: 'cheap-module-eval-source-map', that should be faster for development rebuilds. But breakpoints did not work with this.

    Then we tried with (slower) devtool: 'source-map' and breakpoints are hit.

  4. samvloeberghs commented on Mar 24, 2016

    @samvloeberghs
    Contributor

    @BrainCrumbz : I can also confirm this

  5. largeDachshund commented on May 11, 2016

    @largeDachshund

    Just to clarify, I used cheap-module-eval-source-map. From Chrome Dev Tools, when I clicked in main.bundle.js to set a break point, I expected Chrome to open open my class (in typescript). The break point would land on the ugly javascript in main.bundle.js. But who can read this?

    I followed @BrainCrumbz suggestion. I'm able to click in the javascript source and Chrome resolves the breakpoint in the respective typescript class.

    Thanks, @BrainCrumbz !

  6. BrainCrumbz commented on May 19, 2016

    @BrainCrumbz
    Author

    You're welcome! Happy to be helpful @largeDachshund

  7. phil-lgr commented on Oct 17, 2016

    @phil-lgr

    @BrainCrumbz are you able to hit breakpoints with "sourcemap" when using HMR ?
    with I run with server:dev:hmr (which is npm run server:dev -- --inline --hot), hot module works but when it does the hot-reload I can't hit the same breakpoint.

    Initial state after starting server:dev:hmr:

    Breakpoint is set.

    image

    I add console.log("hot") to my code, and after the hot reload this happen:

    gif

  8. BrainCrumbz commented on Oct 18, 2016

    @BrainCrumbz
    Author

    Sorry, we're not using this starter at the moment, and I've not checked back this issue recently. Maybe someone else more up-to-date with the project can reply.

  9. PatrickJS commented on Sep 2, 2017

    @PatrickJS
    Owner

    sorry this may sound super rule but I'm closing long standing issues and refactoring the codebase. If you run into this problem again feel free to open another issue

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions