mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.0 KiB
78 lines
2.0 KiB
13 years ago
|
// Copyright Joyent, Inc. and other Node contributors.
|
||
|
//
|
||
|
// Permission is hereby granted, free of charge, to any person obtaining a
|
||
|
// copy of this software and associated documentation files (the
|
||
|
// "Software"), to deal in the Software without restriction, including
|
||
|
// without limitation the rights to use, copy, modify, merge, publish,
|
||
|
// distribute, sublicense, and/or sell copies of the Software, and to permit
|
||
|
// persons to whom the Software is furnished to do so, subject to the
|
||
|
// following conditions:
|
||
|
//
|
||
|
// The above copyright notice and this permission notice shall be included
|
||
|
// in all copies or substantial portions of the Software.
|
||
|
//
|
||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||
|
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||
|
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
||
|
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||
|
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||
|
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
||
|
// USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||
|
|
||
12 years ago
|
var repl = require('./helper-debugger-repl.js');
|
||
13 years ago
|
|
||
12 years ago
|
repl.startDebugger('breakpoints.js');
|
||
13 years ago
|
|
||
12 years ago
|
var addTest = repl.addTest;
|
||
13 years ago
|
|
||
|
// Next
|
||
|
addTest('n', [
|
||
13 years ago
|
/break in .*:11/,
|
||
|
/9/, /10/, /11/, /12/, /13/
|
||
13 years ago
|
]);
|
||
|
|
||
13 years ago
|
// Watch
|
||
12 years ago
|
addTest('watch("\'x\'")');
|
||
13 years ago
|
|
||
13 years ago
|
// Continue
|
||
|
addTest('c', [
|
||
13 years ago
|
/break in .*:5/,
|
||
13 years ago
|
/Watchers/,
|
||
|
/0:\s+'x' = "x"/,
|
||
|
/()/,
|
||
13 years ago
|
/3/, /4/, /5/, /6/, /7/
|
||
13 years ago
|
]);
|
||
|
|
||
13 years ago
|
// Show watchers
|
||
|
addTest('watchers', [
|
||
|
/0:\s+'x' = "x"/
|
||
|
]);
|
||
|
|
||
|
// Unwatch
|
||
12 years ago
|
addTest('unwatch("\'x\'")');
|
||
13 years ago
|
|
||
13 years ago
|
// Step out
|
||
|
addTest('o', [
|
||
13 years ago
|
/break in .*:12/,
|
||
|
/10/, /11/, /12/, /13/, /14/
|
||
13 years ago
|
]);
|
||
|
|
||
13 years ago
|
// Continue
|
||
|
addTest('c', [
|
||
13 years ago
|
/break in .*:5/,
|
||
|
/3/, /4/, /5/, /6/, /7/
|
||
13 years ago
|
]);
|
||
|
|
||
13 years ago
|
// Set breakpoint by function name
|
||
|
addTest('sb("setInterval()", "!(setInterval.flag++)")', [
|
||
13 years ago
|
/1/, /2/, /3/, /4/, /5/, /6/, /7/, /8/, /9/, /10/
|
||
13 years ago
|
]);
|
||
|
|
||
|
// Continue
|
||
|
addTest('c', [
|
||
13 years ago
|
/break in node.js:\d+/,
|
||
|
/\d/, /\d/, /\d/, /\d/, /\d/
|
||
13 years ago
|
]);
|
||
|
|
||
12 years ago
|
addTest('quit', []);
|