Debug Javascript with multi-level source maps

I have a lot of javascript files, which goes through grunt uglify and gets minified individually, and further, I am performing grunt concat on these to get a single bundled minified file with source map.


a.js, b.js, c.js ->
Uglify -> a.min.js, b.min.js,c.min.js -> concat -> bundle.min.js

With dev tools and source map, from bundle.min.js, I can trace back only up to a.min.js/b.min.js/c.min.js. Where as my goal is to use source map to trace back up to a.js/b.js/c.js.

Chrome DevTools for node: How to stop in specific file

I try to debug a grunt task with Chrome DevTools on Windows using the following command

node --inspect-brk node_modulesgruntbingrunt 

This works nicely and the Chrome debugger stops in the root grunt javascript. But of course, I do not want to debug grunt, but my own “gruntfile.js”. How can I set a breakpoint into that file, as it is not loaded yet?

I tried to add my project folder in the Chrome DevTools under “FileSystem”, but whatever I add there as a breakpoint does not stop.

Debugging Node Application using Chrome Inspector

Previously, in order to debug my Node applications, I would run the following command:

concurrently node --max-old-space-size=8192 --inspect --debug-brk node_modules/grunt-cli/bin/grunt serve

Now, running the same command always yields:

Running "concurrent:dev" (concurrent) task
    Unable to open devtools socket: address already in use
Warning: Unable to open devtools socket: address already in use Use --force to continue.

I thought that maybe the concurrent portion of the command was causing this issue but upon removing it, the issue persisted.

I can open my Resource Monitor on Windows and kill any tasks that are running on that port to make sure nothing else is using it, but it still fails.

As for my Grunt workflow, when grunt serve is run, another task called concurrent:dev is run which looks like:

concurrent: {
    dev: {
        options: {
            logConcurrentOutput: true
        tasks: [

For context, shell:devWatch does:

devWatch: {
    command: path.resolve(__dirname, 'node_modules/.bin/ng build --watch')

Which finally runs express:dev which looks like:

express: {
    options: {
        port: 9000
    dev: {
        options: {
            background: false,
            script: 'server/server.js'

I’m currently using the 1.6.5 version of the Angular CLI, 3.10.8 of NPM and 6.9.1 of Node.

Have the debug settings changed since these versions? How can I successfully debug my Node application?