Skip to content

Instantly share code, notes, and snippets.

@giuseppeg
Created September 28, 2021 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giuseppeg/088605d00efe7549ae3eab15939895d4 to your computer and use it in GitHub Desktop.
Save giuseppeg/088605d00efe7549ae3eab15939895d4 to your computer and use it in GitHub Desktop.
function track(name) {
const dummy = /./;
dummy.toString = () => {
alert(`${name} was debugged`);
return 'tracked';
};
return dummy;
}
function test() {
const tracked = track('test');
console.log('hello')
}
debugger;
test() // step in test() and step over to L12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment