Javascript Debugger not hitting breakpoints in Aurelia application using gulp watch

Answered

Phpstorm version 163.10154.2, Windows 7 x64, node 6.9.2, npm 4.1.1, gulp 3.9.1

I am using the javascript framework aurelia framework skeleton-esnext and I cannot get the debugger to hit the breakpoints.

Steps taken

1. Setup javascript debug configuration for http://localhost:9000  -- port used by gulp

2. Set breakpoints in welcome.js

3. Run gulp watch on port 9000

4. Run phpstorm debugger

The debugger connection seems correct as I can refresh the page and see the phpstorm debugging console reload the files.

I have also tried various configurations in the /build/tasks/build/build.js as far as generating source maps per 

discussion but it is still not hitting my break points.  I thought I had this working in the past but I can't seem to get it to work now

Thanks,

Dan

 

 

7 comments
Comment actions Permalink

I found the answer the sourcemap srcRoot folder path is incorrect for windows.  Temp fix

add sourcemap write function with corrected sourceRoot manually before build.bundle.

 sourceRoot: 'src'
Note the below fix chang sourceRoot for windows to ../src
.pipe(sourcemaps.write('.', {includeContent: false, sourceRoot: '../src'}))
.pipe(build.bundle());
2
Comment actions Permalink

works with the most recent as well when using mappings above... I also had to change

.pipe(sourcemaps.write('.', {includeContent: false, sourceRoot: '/src'}))

to

.pipe(sourcemaps.write('.', {includeContent: false, sourceRoot: '../src'}))

in build/tasks/build.js to make sure that the generated sourcemaps are correct

1
Comment actions Permalink

Source maps are enabled and working.  I can debug just fine using chromes debugger, just not in phpstorm.  I think this is more of a phpstorm/jspm issue than just specific to Aurelia.  Since the breakpoints do work in chrome it lead me to believe that the problem is possibly with my debug configuration in phpstorm and that is why I am asking here.   

0
Comment actions Permalink

Debugging skeleton-esnext works fine for me (Windows 7 x64, node 6.9.1 - though node version matters nothing here)..

- gulp serve

- set breakpoints in src/welcome.js

- debug my javaScript Debug run configuration (note the mappings set for dist folder):

 

My skeleton version is not the latest (downloaded in August, 2016). and I might have changed the build/tasks/build.js... Not sure. Will check if I can make the most recent skeleton version work

 

0
Comment actions Permalink

Windows 7x64

au-cli 0.31.0

Thank you for the reply it has been awhile and I believe I got it working with gulp but now I am having the same problem using aurelia-cli

 

Thanks again and sorry for the late reply.

0
Comment actions Permalink

Thank you Dan Elebash.

0
Comment actions Permalink

it's likely that source maps are not turned on -- you will get fastest answers for aurelia here: https://gitter.im/aurelia/Discuss

-1

Please sign in to leave a comment.