Breakpoint debugging minfied/mangled/compiled variables

Working on building JavaScript sourcemaps into my workflow and I've been looking for some documentation on a particular part of debugging source maps. In the picture below I'm running compressed Javascript code, but through the magic of source maps Chrome debugger was able to reconstruct the seemingly uncompressed code for me to debug:

Source Maps

However, if you look at the local variables, someNumber and someOtherNumber are not defined. Instead, we have a and r, which are the compiled variable names for this function. This is the same for both Mozilla Firefox and Chrome.

I tried looking through the Chrome DevTools Documentation on sourcemaps, but I didn't see anything written about this. Is it a current limitation of sourcemap debugging and are there any workarounds for this?

update:

I've since found this thread in chromium project issues. It doesn't look like it has been or is being implemented. This is becoming an increasingly more important problem as teams are beginning to implement Babel in their build systems to write ES2015 code. Have any teams found a way around this?


Solution 1:

Using Watch Expressions on the right hand side, usually solves this. Expand the menu, and use the plus button to add your variables. You can use someNumber and someOtherNumber, and even someNumber + someOtherNumber.

Solution 2:

Looks like it's been addressed and will become available in the next Chromium update