-
Notifications
You must be signed in to change notification settings - Fork 1
/
add-breakpoint.js
27 lines (26 loc) · 1.38 KB
/
add-breakpoint.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*
* Execute the "Add Breakpoint" command with your cursor on line 16 to set up a non-breaking breakpoint
* before the execution of that line. This will open the breakpoint configuration inlay. Hit enter to
* make the breakpoint non-conditional. Hit enter again to make the breakpoint single-use and create
* the breakpoint.
*
* Once the breakpoint is created, the breakpoint status inlay will appear. This inlay will show the
* current status of the breakpoint and will be marked as "Complete" once the breakpoint is hit. Once
* the breakpoint is hit, the breakpoint status inlay can be expanded to show a table of the breakpoint
* hits. Clicking on a breakpoint hit will open the breakpoint hit data in the traditional debugger
* variables view.
*/
module.exports = function () {
const randomNumber = Math.floor(Math.random() * 100);
const isEven = randomNumber % 2 === 0;
console.log(`${randomNumber} is ${isEven ? "even" : "odd"}`);
/*
* The "Add Breakpoint" command support PII (Personally Identifiable Information) redaction.
* This allows you to safely add breakpoints to code with sensitive data.
*
* Try adding a breakpoint to output any of the variables below.
*/
const password = "password123"; // redacted via variable identifier
const ssn = "123-45-6789"; // redacted via regex pattern
console.log(`password: ${password}, ssn: ${ssn}`)
}