Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'Step Over' doesn't work while debugging sails App using Webstorm 8

I'm trying to debug a Sails App with WebStorm(8), but "Step Over" doesn't work.

The app will stop at the breakpoint, but when I do "Step Over/Into/...", the app will resume to run. I have try different breakpoints and a different Sails version(0.10), still don't work.

enter image description here

debug output:

/usr/local/bin/node --debug-brk=63616 --nolazy app.js
debugger listening on port 63616
error: Grunt :: debugger listening on port 63616

info: 
info: 
info:    Sails.js           <|
info:    v0.9.16             |\
info:                       /|.\
info:                      / || \
info:                    ,'  |'  \
info:                 .-'.-==|/_--'
info:                 `--'-------' 
info:    __---___--___---___--___---___--___
info:  ____---___--___---___--___---___--___-__
info: 
info: Server lifted in `/Developer/Projects/WebStormProjects/sailsApp`
info: To see your app, visit http://localhost:1337
info: To shut down Sails, press <CTRL> + C at any time.

debug: --------------------------------------------------------
debug: :: Mon Apr 07 2014 17:33:29 GMT+0800 (CST)
debug: 
debug: Environment  : development
debug: Port     : 1337
debug: --------------------------------------------------------
info: handshake authorized DW3xntN8ikUSnkJKiQ2T
info: transport end (undefined)
info: handshake authorized kBuc8aJFzqKHAAgriQ2U

As you can see, the app stops at line 20, but once I press 'Step Over'(or other "Step ****"), the app won't stop at line 21, it will continue to run, unless I setup another breakpoint at line 21.

enter image description here

Do I miss something? Or it a sails' bug or webstorm's bug? I could debug other express apps using WebStorm, this has never happened before.

like image 652
clark Avatar asked Dec 01 '22 19:12

clark


1 Answers

Just tried debugging simple sails app in WebStorm8 - with breakpoint set exactly on the same line of node_modules\sails\lib\hooks\controllers\controller.find.js stepping in/over works as expected. But you have to either remove node_modules from javascript libraries (Settings/javascript/libraries) or make sure to uncheck 'Do not step into library scripts' checkbox in Settings/Debugger/javascript

like image 89
lena Avatar answered Dec 03 '22 08:12

lena