debugging jasmine test cases run by gulp in visual studio code? -


i'm trying debug jasmine test cases in visual studio code debug console. below launch.json , gulpfile.js configuration :

in gulp task tried using 'gulp-jasmine' run test cases , "gulp-karma" (commented below jasmine) alternatively. using either 1 can excute test cases through command line (gulp "task name") or through task.json file in vs code.
however, want debug jasmine test cases(spec/stockspec.js ) itself. on running debug (f5), debugger pauses on entry point in gulpfile.js below :

from here on i'm not able navigate jasmine test cases no matter scenario choose:

scenario 1: on clicking step on (f10) --it skips next gulp task
scenario 2: on clicking step in/out (f11 / shift +f11) --it jumps internal module.js , index.js etc files.

how should proceed further?

this runs through gulpfile.js, doesn't trigger gulp task itself. startup program needs gulp.js gulp task argument. can set breakpoint in unit test.

the following launch configuration works me trigger unittests gulp task:

{   "name": "launch",   "type": "node",   "request": "launch",   "program": "${workspaceroot}/node_modules/gulp/bin/gulp.js",   "stoponentry": false,   "args": [     "unittests"   ],   "cwd": "${workspaceroot}/src/",   "prelaunchtask": null,   "runtimeexecutable": null,   "runtimeargs": [     "--nolazy"   ],   "env": {     "node_env": "development"   },   "externalconsole": false,   "sourcemaps": false,   "outdir": null } 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -