question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Breakpoints or Source Maps not working properly in Chrome

See original GitHub issue

I’m using Storybook for some components, but breakpoints are not working correctly in Chrome Dev Tools.

I was able to reproduce the same issue in thekadira-samples/react-storybook-demo app with no modifications (the Todos app sample). Just clone it from github, do npm i and npm run storybook and open your browser to localhost:9001.

If I open TodoItem.js in the Chrome Dev Tools “Source” tab, and put a breakpoint on the first line of render(), then make a change in Storybook that causes a TodoItem to need to re-render (e.g., mark one as complete), the debugger “breaks”, but the file that Chrome Dev Tools shows has the name ?d41d, and the contents of the file is just the following:

undefined


/** WEBPACK FOOTER **
 ** 
 **/

Switching over to TodoItem.js has no effect, and single stepping just continues execution.

Anyone else have debugging working in Storybook?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:3
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
markov00commented, Feb 1, 2019

@dagatsoin I’m currently on 4.1.11 and it’s just a matter of adding the following on your storybook webpack config:

  config.devtool = 'inline-source-map';
0reactions
trianta2commented, Mar 22, 2020

Thanks @markov00 , your solution worked for me. For those like me who are still new to storybook, follow this example to update the storybook webpack config.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Breakpoints in Chrome not working with Sourcemap
I've deleted my app file and map, re-run gulp webpack which auto-generates it again, and it still does not break where I want...
Read more >
Breakpoints or Source Maps not working properly in Chrome
I'm using Storybook for some components, but breakpoints are not working correctly in Chrome Dev Tools. I was able to reproduce the same ......
Read more >
1142705 - breakpoints stop working when 2 sourcemaps point ...
It only stops while it points to a single file, once you have 2 files maps pointing to a single one the breakpoints...
Read more >
Breakpoints not hit when using inline sourcemaps produced ...
When I debug with IntelliJ (14.1.4), none of the breakpoints triggers a stop. Chrome is however capable of hitting breakpoints. I have set...
Read more >
Using the Chrome Debugger Tools, part 3: The Source Tab
At its simplest, the Sources tab allows you to set breakpoints and evaluate ... The "loading" icon in the upper-left corner of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found