summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/test/mochitest/examples/pause-points.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/debugger/test/mochitest/examples/pause-points.js')
-rw-r--r--devtools/client/debugger/test/mochitest/examples/pause-points.js43
1 files changed, 43 insertions, 0 deletions
diff --git a/devtools/client/debugger/test/mochitest/examples/pause-points.js b/devtools/client/debugger/test/mochitest/examples/pause-points.js
new file mode 100644
index 0000000000..36e98aebb9
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/pause-points.js
@@ -0,0 +1,43 @@
+function funcb(msg) {
+ console.log(msg)
+}
+
+function a() {return true}
+function b() {return false}
+
+function statements() {
+ debugger;
+ { funcb(); funcb(); }
+ console.log("yo"); console.log("yo");
+ debugger; debugger;
+}
+
+function flow() {
+ debugger;
+ if (true) console.log("hi")
+ var i = 0;
+ while(i++ < 2) console.log(i);
+}
+
+function sequences() {
+ debugger;
+
+ const a = {
+ a: 1
+ }
+
+ const b = [
+ 1,
+ funcb()
+ ]
+
+ funcb({
+ a: 1,
+ })
+}
+
+function expressions() {
+ debugger
+ a() ? b() : b()
+ const y = ` ${funcb()} ${funcb()}`;
+}