Notice: Undefined index: rate in /home/content/p3pnexwpnas11_data03/84/3795084/html/wp-content/themes/publisher/includes/functions.php on line 5532
Some tools might be better than others, it all depends on your use-case, but in any case they will help you reduce your development time and make the debugging process easier.
Outputting the Data to the Browser
‘alert()’ – Popping up Messages
‘console.log()’ – Logging Lines to Browser Console
‘debugger’ – Pausing Code Execution
The ‘debugger;’ statement if present in the code will function as a breakpoint and pause code execution. This allows you to investigate with the dev tools while the code is in a paused state.
Node.js ships with an out-of-process debugging utility, accessible via a TCP-based protocol and built-in debugging client.
Postman for Debugging Requests and Responses
“Collections” one of the main feature offered by Postman allows you to save sets of requests ad responses of your application or an API. Using Postman you can save your valuable time when collaborating with others or repeating the same set of tests. When using Postman collections, you can update the collection if necessary and then use it. This is much faster than repeatedly writing out every test.
JSON Formatter and Validator
When looking at an unformatted JSON (condensed or minified), it becomes incredibly difficult to spot errors, whether they are syntax errors or keys which have incorrect values.
To spot the error, you have to expand the object and format it and waste your valuable time while debugging. The JSON Formatter & Validator is there to help you get relieved from that pain point. You simply paste your JSON in, and it outputs the correctly formatted version. The tool will even automatically validate syntax to RFC standards, depending on which you select, if any.
If you use Webpack to bundle your site or application, then you have the advantage of the stats data available from the tool. This data can range from build logs and error, module contents and the relationship that exist between modules, and much more. You can even use pre-built tools, such as the Webpack Analyse Web App, to visualize the stats that you generate from Webpack.
The use cases will be different for every application you develop, but learning new tools will help you figure out the best options you might have.