File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -70,3 +70,21 @@ Notes:
7070 the transpiler specs),
7171- You can also add ` debugger; ` statements in the specs (JavaScript). The execution will halt when
7272 the developer tools are opened in the browser running Karma.
73+
74+ ## Debug the tests
75+
76+ If you need to debug the tests:
77+
78+ - add a ` debugger; ` statement to the test you want to debug (oe the source code),
79+ - execute karma ` node_modules/karma/bin/karma start karma-js.conf.js ` ,
80+ - press the top right "DEBUG" button,
81+ - open the dev tools and press F5,
82+ - the execution halt at the ` debugger; ` statement
83+
84+ Note (WebStorm users):
85+ You can create a Karma run config from WebStorm.
86+ Then in the "Run" menu, press "Debug 'karma-js.conf.js'", WebStorm will stop in the generated code
87+ on the ` debugger; ` statement.
88+ You can then step into the code and add watches.
89+ The ` debugger; ` statement is needed because WebStorm will stop in a transpiled file. Breakpoints in
90+ the original source files are not supported at the moment.
You can’t perform that action at this time.
0 commit comments