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

Sourcemaps broken in simplest example #2990

Closed
1 task done
tmcw opened this issue Sep 25, 2017 · 6 comments
Closed
1 task done

Sourcemaps broken in simplest example #2990

tmcw opened this issue Sep 25, 2017 · 6 comments

Comments

@tmcw
Copy link
Contributor

tmcw commented Sep 25, 2017

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

I'd expect sourcemaps of a basic module to enable breakpoint selection on all lines, except those clearly represented differently through transpilation.

Current Behavior

A basic component is not debuggable with sourcemaps: clicking on a line to set a breakpoint does not set a breakpoint at that line.

Steps to Reproduce (for bugs)

  1. Example: https://github.com/tmcw/next-sourcemap-breakage-example

Single page with the source:

import {Component} from "react";
export default class Button extends Component {
  render() {
    function foo() {
      console.log(1);
    }
    return <button onClick={foo}>hi</button>
  }
};

Setting a breakpoint on the line

      console.log(1);

Is not possible:

next-bug

Context

This makes debugging applications quite difficult.

Your Environment

Tech Version
next 3.2.2
node 8.4.0
OS macOS 10.12.6
browser Google Chrome 61.0.3163.100
@timneutkens
Copy link
Member

cc @kpdecker since you updated the sourcemaps 👌

@ckeeney
Copy link

ckeeney commented Oct 10, 2017

I have this problem too and I'm surprised more developers are not complaining about this issue. Is there a workaround for this?

@tmcw
Copy link
Contributor Author

tmcw commented Oct 12, 2017

I've updated the testcase repository to React v0.16.x and Next.js ^4.0.3, and can confirm the issue persists in the updated versions.

@scsper
Copy link

scsper commented Oct 17, 2017

I've also seen this issue in our app

@kpdecker
Copy link
Contributor

#3121 fixes both the immediate issue here and another where breakpoints were lost in Chrome on every page refresh.

@lock
Copy link

lock bot commented May 10, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants