Whether I set breakpoints directly on the source/console or add a debugger
on my code, the browser doesn't seem to respond to them. Any ideas why? Here's my code:
if (select[i].placeholder != undefined && select[i].placeholder != '' ) {
selected.appendChild(document.createTextNode(select[i].placeholder)); debugger;
} else if (select[i].options[0].value == '' && select[i].options[0].textContent != '' ) {
selected.appendChild(document.createTextNode(select[i].placeholder));
} else {
selected.appendChild(document.createTextNode('Select an option'));
}
In the debugger window, you can set breakpoints in the JavaScript code. At each breakpoint, JavaScript will stop executing, and let you examine JavaScript values. After examining values, you can resume the execution of code (typically with a play button).
In Dev Tools, on the Sources panel, there's a button that looks like a breakpoint marker with a line through it: That button disables all breakpoints. To re-enable them, click the button.
Here's what it looks like when they are currently enabled (clicking it disables them):
...and when they are currently disabled (clicking it enables them):
Restarting the app worked for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With