My VS Code debugger broke. Took 3 days to find the dumbest fix.
My VS Code debugger broke. Took 3 days to find the dumbest fix. Was debugging a Node script last week. Breakpoints wouldn't hit. Console.log worked fine so I kept using that like an animal for 3 da...

Source: DEV Community
My VS Code debugger broke. Took 3 days to find the dumbest fix. Was debugging a Node script last week. Breakpoints wouldn't hit. Console.log worked fine so I kept using that like an animal for 3 days straight. Turns out I had the wrong launch config the whole time. I'm working on a scraper that pulls product data. It kept returning undefined for certain fields. Console.log showed me the response looked fine, but somewhere in the parsing it was breaking. So I did this: console.log('response:', response); console.log('data:', data); console.log('product:', product); console.log('price:', price); // undefined - cool cool cool Twenty console.log statements later I still couldn't see where it was breaking. The terminal output was a mess. Scrolling through walls of JSON trying to spot the issue. I knew VS Code had a debugger. I'd used it before on other projects. But this time the breakpoints just... didn't work. They'd show up as gray circles instead of red. Script would run straight throug