![]() ![]() Configure VS Code to actually start your Next.js application for you and connect to its debugger.All of that is explained in VS Code gigantic Node.js debugging documentation page. There are multiple ways to connect the VS Code inspector to your Next.js application running in debug mode. ![]() You can also skip to the chosen solution. This is a convoluted title but it just means connecting either VS Code debugging feature or Chrome DevTools to your Next.js application. Step four: connect your debugging inspector You can skip to step two if you already have a Next.js applicationĮnter fullscreen mode Exit fullscreen mode Step one: create your Next.js debugging demo application I will be using a fresh create-next-app example to demonstrate how it works. Now after using VS Code to debug both my React and Node.js code I really think it's way more powerful than a regular console.log(obj) > reload page > switch to a terminal (□ repeat with console.log(obj.property.) flow. The whole debugging experience was painful and you spent more time switching windows than anything else. In the browser at least it was working but then Node.js came and it was again very hard to debug it nicely. The reason for this habit I believe is that JavaScript debugging tools were always kind of working but not really. ![]() I always thought that I don't need a debugger in JavaScript: I can just console.log my way out most of the time.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |