A lot of the material derives from:
Β
π Introduce yourself in the chat π¬
Share with you the debugging mindset and some tools for JavaScript debugging
Β
$ node stacktrace.js
/Users/harrymoreno/stacktrace.js:9
notDefined();
^
ReferenceError: notDefined is not defined
at c (/Users/harrymoreno/stacktrace.js:9:3)
at b (/Users/harrymoreno/stacktrace.js:6:3)
at a (/Users/harrymoreno/stacktrace.js:3:3)
at Object.<anonymous> (/Users/harrymoreno/stacktrace.js:11:1)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Function.Module.runMain (module.js:575:10)
$ node stacktrace.js
/Users/harrymoreno/stacktrace.js:9
notDefined();
^
ReferenceError: notDefined is not defined
at c (/Users/harrymoreno/stacktrace.js:9:3)
at b (/Users/harrymoreno/stacktrace.js:6:3)
at a (/Users/harrymoreno/stacktrace.js:3:3)
at Object.<anonymous> (/Users/harrymoreno/stacktrace.js:11:1)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Function.Module.runMain (module.js:575:10)
Text
Ignore errors we are not owners
$ node stacktrace.js
/Users/harrymoreno/stacktrace.js:9
notDefined();
^
ReferenceError: notDefined is not defined
at c (/Users/harrymoreno/stacktrace.js:9:3)
at b (/Users/harrymoreno/stacktrace.js:6:3)
at a (/Users/harrymoreno/stacktrace.js:3:3)
at Object.<anonymous> (/Users/harrymoreno/stacktrace.js:11:1)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Function.Module.runMain (module.js:575:10)
Text
$ node stacktrace.js
/Users/harrymoreno/stacktrace.js:9
notDefined();
^
ReferenceError: notDefined is not defined
at c (/Users/harrymoreno/stacktrace.js:9:3)
at b (/Users/harrymoreno/stacktrace.js:6:3)
at a (/Users/harrymoreno/stacktrace.js:3:3)
at Object.<anonymous> (/Users/harrymoreno/stacktrace.js:11:1)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Function.Module.runMain (module.js:575:10)
Text
Type of error
$ node stacktrace.js
/Users/harrymoreno/stacktrace.js:9
notDefined();
^
ReferenceError: notDefined is not defined
at c (/Users/harrymoreno/stacktrace.js:9:3)
at b (/Users/harrymoreno/stacktrace.js:6:3)
at a (/Users/harrymoreno/stacktrace.js:3:3)
at Object.<anonymous> (/Users/harrymoreno/stacktrace.js:11:1)
at Module._compile (module.js:541:32)
at Object.Module._extensions..js (module.js:550:10)
at Module.load (module.js:456:32)
at tryModuleLoad (module.js:415:12)
at Function.Module._load (module.js:407:3)
at Function.Module.runMain (module.js:575:10)
Text
Stack Frame entry point
// stacktrace.js
a = () => {
b();
}
b = () => {
c();
}
c = () => {
notDefined();
}
a();
// stacktrace.js
a = () => {
b();
}
b = () => {
c();
}
c = () => {
notDefined();
}
a();
Ask the right questions
Read the stack trace
Set up a checklist of what should happen!
Document how to solve the bug!
Β
@luucamay_