6 ms·
Thanks, I know I could do it in the console or the original source. But I was referring to the fact that the sentence in the post says to convert it to a getter
by BMorearty 3y ago
Thanks, I know I could do it in the console or the original source. But I was referring to the fact that the sentence in the post says to convert it to a getter "either in the original source code or using a conditional breakpoint."
- altano 3y agoOh! I understand the question now. You can put any expression into a conditional breakpoint, so anything you can do in the console you can do in a conditional breakpoint. So, if you're doing this sort of thing once, you can just type it into the console and you're golden. But if you want to modify a stack local variable over and over again every time it is initialized, it's much easier to do in a conditional breakpoint because then it will happen every time that line of code runs, and your debugger never has to pause. (see https://alan.norbauer.com/articles/browser-debugging-tricks#changing-program-behavior https://alan.norbauer.com/articles/browser-debugging-tricks#...)
- BMorearty 3y agoGot it! Thank you for the explanation.