<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Habeeb Bombata</title>
  <id>http://nottherealillest.github.io</id>
  <link href="http://nottherealillest.github.io" />
  <link href="http://nottherealillest.github.io/atom.xml" rel="self" />
  <updated>2019-01-02T20:18:05+00:00</updated>
  <rights>Copyright 2014, Habeeb Bombata</rights>
  <author>
    <name>Habeeb Bombata</name>
  </author>
  
    <entry>
      <title>Node.js explained for mannequins</title>
      <link href="http://nottherealillest.github.io/2019/01/02/Node.js-explained-for-mannequins/" />
      <summary type="html">&lt;p&gt;&lt;img src=&quot;https://static.webpunks.co/uploads/2016/08/nodejs-modules-webentwicklung-webdevelopment-webpunks.jpg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;
&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Node.js or node is an open source and cross-platform runtime environment for executing javascript code outside of a browser.&lt;/p&gt;

&lt;p&gt;Quite often, we use node to build back-end services also called API (Application Programming Interface), these are the services that power client applications like the web app running inside of a web browser, or a mobile app running on a mobile device, these client apps are simply what the user sees and interacts with.
The apps themselves are  just the surface, they need to talk to some sort of service sitting on a server or in the cloud to store data, send emails or push notifications, and much more&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Node.JS is ideal for building Highly scalable, data-intensive and real-time back-end services that power client applications.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Well you might be thinking, but there are other back-end services or frameworks such as ASP.NET, Rails, etc, so what’s so special abouT node?&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Great for prototyping and agile development&lt;/li&gt;
  &lt;li&gt;Superfast and highly scalable&lt;/li&gt;
  &lt;li&gt;Javascript Everywhere (Cleaner and more consistent codebase)&lt;/li&gt;
  &lt;li&gt;The Largest ecosystem of open-source libraries.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;node-architecture&quot;&gt;Node Architecture&lt;/h2&gt;
&lt;p&gt;Before node.js we used javascript to build applications that ran only inside a browser, every browser has a javascript engine that takes our javascript code and converts it to machine code (code computer can understand ).
Microsoft uses chakra, firefox uses spider monkey and chrome uses V8, because of this variety of engines js can behave differently in different browsers.&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;A browser provides a runtime environment for javascript code, up to 2009 the only way to execute js was in a browser in 2009 Ryan dahl the creator of Node.js came up with a brilliant idea he thought it would be great to execute js out of a browser so he took chrome’s v8 engine and embedded it inside a c++ program and  called that program Node.exe so similar to a browser node is a runtime environment for js code ….&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I know what you’re thinking why did Ryan create a runtime environment out of the browser, couldn’t he use the browser offline? … 
why must this be complicated ?
Now, we will look a bit more into that.&lt;/p&gt;

&lt;p&gt;Node has certain objects that provide an environment for our js code, these objects are different from the environmental objects we have in browsers, for example in browsers we have the window or the document object &lt;code class=&quot;highlighter-rouge&quot;&gt;document.getElementById('')&lt;/code&gt; which allows us to work with the environment which our code is running (the browser). 
but with Node js, we don’t have the document or window object. one very important thing to note was that initially when js was created it was created to run in browsers so it had no access to things like the file system ( for security purposes ) so now with node it gives us more interesting capabilities we can work with the file system &lt;code class=&quot;highlighter-rouge&quot;&gt;fs.readFile()&lt;/code&gt; listen for requests &lt;code class=&quot;highlighter-rouge&quot;&gt;http.createServer()&lt;/code&gt; and so much more which we can’t do inside of a browser
so we can see that both chrome and node use the V8 engine but they provide different runtime environments for Javascript.&lt;/p&gt;

&lt;h5 id=&quot;node-is-not-a-programming-language&quot;&gt;Node is not a programming language!&lt;/h5&gt;
&lt;h5 id=&quot;node-is-not-a-framework&quot;&gt;Node is not a framework!&lt;/h5&gt;

&lt;h2 id=&quot;how-does----node-work&quot;&gt;How does    Node work&lt;/h2&gt;
&lt;p&gt;I had mentioned earlier that Node applications are highly scalable, well that is because of the non-blocking/Asynchronous nature of node&lt;/p&gt;

&lt;h4 id=&quot;what-is-asynchronous-non-blocking&quot;&gt;What is Asynchronous/ non-blocking?&lt;/h4&gt;
&lt;p&gt;Let me try to explain with a metaphor, imagine you go to a restaurant and, the waiter comes to customer A’s table takes the order for customer A and goes to the kitchen, drops the order for the chef to prepare the meal so while the chef is preparing the meal he comes back to take customer B’s order drops the order in the kitchen and that way the same waiter can be used to serve many different tables so they don’t have to wait for the chef to finish Customer A’s food before they are served … This is what we call Asynchronous or non-blocking architecture.&lt;/p&gt;

&lt;h4 id=&quot;synchronous--blocking-architecture&quot;&gt;Synchronous / Blocking Architecture&lt;/h4&gt;
&lt;p&gt;Back to our restaurant example, imagine you go to a restaurant and in this restaurant the waiter takes your order goes to the kitchen and waits there for the chef to prepare your meal and while the chef is preparing your meal, the waiter is not doing anything then when the meal is ready the waiter serves you and proceed to the next table. 
This is what we call blocking or Synchronous architecture and that is how applications like ASP.net or Rails work out of the box.&lt;/p&gt;

&lt;p&gt;So when we receive a request a thread is assigned to handle that request, it is likely we will query a database and sometimes it might take a little while until the result is ready, so while the result is processing that thread is sitting idle doing nothing so we need a new thread to process requests for another client, so what would happen if we had a large number of concurrent clients, at some point we will run out of threads to serve the clients, so new clients have to wait and if we don’t want them to wait we need to add more hardware. With this kind of architecture we are not utilizing resources efficiently and that is the problem with synchronous architecture and that’s how back-end frameworks like rails or asp.net work by default. off-course its possible to make asp.net asynchronous but that would require extra work node.js comes asynchronous out of the box.&lt;/p&gt;

&lt;p&gt;So in Node we have a single thread handling multiple requests, if it is querying a DB it doesn’t have to wait for the DB to return results. when the DB returns the results it puts it in something called an event queue, node is continuously monitoring this queue in the background, when there’s an event it will take it out and process it, this makes node ideal for I/O-intensive apps, Node should not be used for CPU intensive apps like video encoding or image manipulation in these apps we have a lot of calculation to be done by the CPU and few that touch the file system.&lt;/p&gt;

&lt;h2 id=&quot;in-conclusion&quot;&gt;In conclusion&lt;/h2&gt;
&lt;blockquote&gt;
  &lt;p&gt;Javascript itself is a single-threaded, non-blocking, asynchronous, concurrent language, it has a callback, an event loop, a callback queue, and some other API’s and stuff&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;node is a runtime environment for js, javascript itself has some inbuilt functions for codes to be non-blocking (the definition for blocking is relative but we all agree that blocking is slow code ) and a common example is the set timeout.&lt;/p&gt;

&lt;p&gt;Also node.js also has some applications on the front-end if you’re curious. 
You can let me know if you would like an advanced article expatiating more on node.js or applications of Node in the front-end, or writing a simple back-end node server, you can reach me &lt;a href=&quot;https://twitter.com/nottherealilest&quot;&gt;here&lt;/a&gt; …Remember this blog is for all things Javascript.&lt;/p&gt;
</summary>
      <id>http://nottherealillest.github.io/2019/01/02/Node.js-explained-for-mannequins/</id>
      <updated>2019-01-02T20:38:20+00:00</updated>
      <author>
        <name>Habeeb Bombata</name>
      </author>
    </entry>
  
    <entry>
      <title>Convenient JavaScript Coding with VS Code Extensions</title>
      <link href="http://nottherealillest.github.io/2018/06/05/Convenient-JavaScript-Coding-with-VS-Code-Extensions/" />
      <summary type="html">&lt;p&gt;&lt;img src=&quot;https://3.bp.blogspot.com/-2NbMpOwY07o/WwSoA-or-kI/AAAAAAAAA1M/aFVbRNqQ2SMr0zPFk2V5f5Omc_WEX_BcACLcBGAs/s640/Screen%2BShot%2B2018-05-23%2Bat%2B12.08.47%2BAM.png&quot; alt=&quot;NPM Speed checker by @expensivestevie&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Battle of choosing the right Code editor is tough, From Atom to Sublime text to Notepad ++&lt;/strong&gt; (Pun Intended) ,
However we wont be Discssing Notepadd++ or sublime text Plugins we will be looking at VS code.&lt;/p&gt;

&lt;p&gt;Visual studio code provides an amazing environment for development; especially for JavaScript developers.
The cross-platform text editor since introduced by Microsoft and has attracted a large number of developers
because of its better performance &amp;amp; long listed amazing features.
As a  developer, having a well calibrated editor is paramount to productivity,
Great tooling can help developers write faster, cleaner, and more consistent code.
VS Code already does a lot right from install but with time you might want to add a few extensions, well Fourtunatley
VS Code vibrant extension community this very easy with well over 7,00,000 downloads per month.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We will look at must have plugins, Nice to have and a few Honourable mentions.&lt;/strong&gt;&lt;/p&gt;

&lt;h2 id=&quot;the-must-have&quot;&gt;The Must Have&lt;/h2&gt;
&lt;p&gt;This List was Very Hard to compile, Choosing between so many Great Extensions, some were given preferences according to my personal needs also taken into consideration and there still tons of extensions left i might just write a part two.&lt;/p&gt;

&lt;h3 id=&quot;git-lense&quot;&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens&quot;&gt;Git Lense&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://3.bp.blogspot.com/-x0OCRondXzA/WwS4dYlOZlI/AAAAAAAAA1s/wLouwsKA_-QCYqhYRrI9ZwoeQ76Xfn8ZQCLcBGAs/s1600/1_DS2aWPI70ydDx4WHkkiJVQ.gif&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The Git Lens extension is truly amazing, it enables you to visualize code authorship within VS Code. You can browse and explore the history of a file, view a git blame annotation for each file line, and even add a changes (diff) hover annotation, all of which are fully customisable. GitLens is especially useful on larger projects where you may not be aware who wrote what within a given file.with GitLens you can easily see with a glance who wrote a specific line right from the bottom status bar. and when specific questions arise they can be contacted.&lt;/p&gt;

&lt;h3 id=&quot;npm-intellisense&quot;&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=christian-kohler.npm-intellisense&quot;&gt;NPM Intellisense&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://3.bp.blogspot.com/-8wopPOQ1fYs/WwS7dDkQ9CI/AAAAAAAAA2A/BAskAP2uPHULtJuzKcXITZzB-HJ840bqQCLcBGAs/s1600/1_7P4jVq5Vxd51noleeYtLAQ.gif&quot; alt=&quot;&quot; /&gt;
The npm InteliSense extension is a small utility to enable autocompletion of module names in require statements using the VS Code IntelliSense feature. The extension is dead simple, but provides a nice quality of life improvement when in development.&lt;/p&gt;

&lt;h3 id=&quot;eslint&quot;&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint&quot;&gt;ESLint&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://1.bp.blogspot.com/-qAWJR-zZg2c/WwS_fVHajQI/AAAAAAAAA2Y/xPo9bZSsxHY4p73TSCgA7aRJrh7MYl4xQCLcBGAs/s1600/1_DA9ZTXYt-r_xV2Yp_G3cew.gif&quot; alt=&quot;&quot; /&gt;
ESLint is a very commonly used and highly customizable JavaScript linter that can be configured for most major frameworks and code styles. Instead of having to manually run ESLint to see what errors out, this specific VS Code implementation of ESLint highlights the linting errors within the editor, as well as offers to automatically resolve them with a few mouse clicks.&lt;/p&gt;

&lt;p&gt;Although comes with IntelliSense built in which does a perfectly descent job of code hinting.” That’s true, but what if not everyone on your project is using the same editor? What if you want to have different config settings just for JSX, or specific ECMAScript version for vanilla JS running in the browser, or Node.js server code? Well, ESLint has got you covered for all those scenarios.&lt;/p&gt;

&lt;p&gt;This extension integrates ESLint into VS Code, it requires you to already have ESLint installed on your computer: either locally or globally. You can do this with npm, by running npm &lt;code class=&quot;highlighter-rouge&quot;&gt;install -g eslint.&lt;/code&gt; There are more detailed configuration and installation settings and instructions on the extension marketplace page.&lt;/p&gt;

&lt;h3 id=&quot;todo-highlight&quot;&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=wayou.vscode-todo-highlight&quot;&gt;todo Highlight&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://2.bp.blogspot.com/-eDARPB6cz5Q/WwTClalDB3I/AAAAAAAAA2w/iWlrTkIZhJg4U9ckFxOAjx_IEA9mJ0KSgCLcBGAs/s1600/1_F5s06_EuXWZIg281ajKN9g.png&quot; alt=&quot;&quot; /&gt;
It often happens that you code a function, and think that there is a probably better way to do the same thing. You leave a comment // TODO: Needs Refactoring or something to that effect. But then you forget about the note and push your code to master/production. With Todo Highlighter, that won’t happen. Hopefully.&lt;/p&gt;

&lt;p&gt;It highlights your TODOs/FIXMEs or any other annotation in your code in bright colours so it is always clearly visible. One nifty feature is List Highlighted annotations. It lists all the TODOs in the output console.&lt;/p&gt;

&lt;h2 id=&quot;the-nice-to-have&quot;&gt;The Nice to Have&lt;/h2&gt;
&lt;h2 id=&quot;open-in-browser&quot;&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=techer.open-in-browser&quot;&gt;Open in Browser&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;&lt;img src=&quot;https://media.giphy.com/media/T98qiqDT6cI9vcihSr/giphy.gif&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;vscode-great-icons&quot;&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=emmanuelbeziat.vscode-great-icons&quot;&gt;VSCode Great Icons&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://3.bp.blogspot.com/-qYg8Cd6MRNw/WwTS5_TpbXI/AAAAAAAAA3I/i0WCkDkotjkdWbxWUZj79sECUet_PWhOgCLcBGAs/s1600/1_HRC8VGLAnnes1ylMRhAwqA.jpeg&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;trailing-white-spaces&quot;&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces&quot;&gt;Trailing white spaces&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://media.giphy.com/media/4QEGyO72NgUCyyAGvu/giphy.gif&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;code-runner&quot;&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner&quot;&gt;Code Runner&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://1.bp.blogspot.com/-sFhZOk7bQgw/WwTU6jR4_DI/AAAAAAAAA3U/w0ewbR0p2lI-Gz-kDQ6-IM0nAPfRnQL_ACLcBGAs/s1600/1_OAD4CzbkQz05eCqvy_XNsg.gif&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;material-palenight&quot;&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=whizkydee.material-palenight-theme&quot;&gt;Material Palenight&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;https://4.bp.blogspot.com/-KrlKhOQS8VQ/WwSoQdqCOOI/AAAAAAAAA1Q/uZYSNKA8zD0Sl008HuGyfSiTr3Y17h81QCLcBGAs/s1600/Screen%2BShot%2B2018-05-23%2Bat%2B12.30.49%2BAM.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;some-honorable-mentions&quot;&gt;Some Honorable mentions&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments&quot;&gt;Better Comments&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://github.com/Microsoft/vscode-chrome-debug&quot;&gt;Debugger for Chrome&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint&quot;&gt;Eslint&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=wix.vscode-import-cost&quot;&gt;Import cost&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker&quot;&gt;Code Spell Checker&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=steoates.autoimport&quot;&gt;Auto Import&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=whtouche.vscode-js-console-utils&quot;&gt;Console Utils&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;a href=&quot;https://github.com/alefragnani/vscode-project-manager&quot;&gt;Project Manager&lt;/a&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;VS Code has a huge library of extensions to choose from,and I’ve barely grazed the surface. If you have an extension you think i missed please feel free to reach out to me.&lt;/p&gt;

&lt;p&gt;This blogpost was Originally written for Codeship authored by me you can find it &lt;a href=&quot;https://blog.codeship.com/convenient-javascript-coding-with-vs-code-extensions/&quot;&gt;here&lt;/a&gt;&lt;/p&gt;

</summary>
      <id>http://nottherealillest.github.io/2018/06/05/Convenient-JavaScript-Coding-with-VS-Code-Extensions/</id>
      <updated>2018-06-05T16:57:51+00:00</updated>
      <author>
        <name>Habeeb Bombata</name>
      </author>
    </entry>
  
    <entry>
      <title>Effectively debugging Node.js</title>
      <link href="http://nottherealillest.github.io/2018/04/30/Effectively-debugging-Node.js/" />
      <summary type="html">&lt;p&gt;Debugging is the task to identify and remove errors from software applications, and is more than just printing out values in your code. This post describes how to efficiently debug Node.js programs using the latest Google Chrome DevTools. A lot of developers use console.log in order to debug their application. but why? The answer is easy: It’s inconvenient to use the debugger if you haven’t set up your environment correctly.&lt;/p&gt;

&lt;h2 id=&quot;why-consolelog-is-not-the-best-option&quot;&gt;Why console.log is not the best option?&lt;/h2&gt;
&lt;p&gt;Using console.log to debug your code generally dives you into an infinite loop of “stopping your app, adding a console.log, and start your app again” operations. Besides slowing down the development of your app, it also makes your writing dirty and creates unnecessary code. Finally, trying to log out variables alongside with the noise of other potential logging operations, may make debugging difficult when attempting to find the values you are debugging.&lt;/p&gt;
&lt;h2 id=&quot;debugging-tools&quot;&gt;Debugging tools&lt;/h2&gt;
&lt;p&gt;Debugging tools provide you with a few important functionalities that console.log isn’t able to provide. In particular they let you pause the execution of your application at specific points in the code, and inspect and modify the values of the variables while the program is still running.&lt;/p&gt;

&lt;h2 id=&quot;built-in-debugger&quot;&gt;Built-in debugger&lt;/h2&gt;
&lt;p&gt;Node.js ships with a built-in debugging facility. If you start your application on the command line with node debug index.js where index.js is the starting point of your application then it is started in debug mode. This command has two effects: You start an interactive debugging shell and you open a TCP connection on port 5858 where you can connect a remote debugger with your application. The CLI debugger is the most uncomfortable solution directly after debugging with console.log. But you have a set of commands that make it possible to navigate within your application at run time.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;$ node debug index.js&lt;/code&gt;&lt;/p&gt;
&lt;h2 id=&quot;more-advanced-debugging&quot;&gt;More Advanced Debugging&lt;/h2&gt;

&lt;p&gt;Chrome and Node.js share with V8 the same JavaScript engine, so it should be possible to use the same tools for debugging and profiling your applications. For older versions of Node.js there was a tool named node-inspector which connected the V8 engine of node with the Chrome Developer Tools. Unfortunately it doesn’t work for current Node.js versions. But this is not a problem anymore, because in May 2016 the –inspect flag landed in Node.js and with it a much better debugging support. In contrast to node-inspector you don’t have to install any additional module in order to get the –inspect flag working. You just have to start your application with this flag.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;highlighter-rouge&quot;&gt;$ node--inspect index.js&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;As soon as you start your application, Node.js provides you with a URL which you have to copy to the address field of your Chrome browser. Your browser then connects to your Node.js instance and lets you debug and profile your application. This includes setting breakpoints and watch expressions or capturing memory snapshots of your application.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://1.bp.blogspot.com/-dHmej0Wcs2w/Wst7G5U1sqI/AAAAAAAAAxc/Gufv9VJSRsEn0GaBpuW8zZaoQtjUqVjtACLcBGAs/s1600/ffc.png&quot; alt=&quot;Debug your Node.js application with Chrome Developer Tools&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;ide-debugging-vs-code&quot;&gt;IDE Debugging (VS Code)&lt;/h2&gt;
&lt;p&gt;Most of the current IDEs support debugging of Node.js applications such as WebStorm, Eclipse or Visual Studio Code.
It’s surprisingly easy to get your debugging environment started in Visual Studio Code, which is by the way just another Node.js application. You just have to hit the debug button on the left side of the window and select the environment you want to debug (Node.js). Visual Studio Code then creates the launch configuration for you and saves it to the .vscode/launch.json file in the root folder of your application. Depending on the starting point of your application you have to make an adjustment here. VSCode expects your application to start at app.js. If you name the starting point differently, just go to launch.json and change the value of the program key. After this is done, you can launch your debugger and have a look at your application.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;https://4.bp.blogspot.com/-s_yxJKn_dKs/Wsp8KyNMTqI/AAAAAAAAAww/yGeIt63znXUlMZ-W68tLPAHMcfmc0cwVQCLcBGAs/s1600/NodeDebug-VSC.png&quot; alt=&quot;&quot; /&gt;&lt;/p&gt;

&lt;p&gt;For this example  a simple web server was created. In order to debug this application, you have to set a breakpoint (by clicking on the left of the line number), launch the debugger and go to the server URL in your local browser. The application then automatically stops at your breakpoint and you can start stepping through your code.&lt;/p&gt;

&lt;p&gt;As you see, there’s no more need for console.log statements to debug your application code. Just start the debugger of your choice and have a comfortable interface to have a look at your code at run time.&lt;/p&gt;

&lt;p&gt;This blogpost was Originally written for Codeship authored by me you can find it &lt;a href=&quot;https://blog.codeship.com/debug-node-js-effectively-with-chrome-devtools/&quot;&gt;here on codeship’s blog&lt;/a&gt;&lt;/p&gt;
</summary>
      <id>http://nottherealillest.github.io/2018/04/30/Effectively-debugging-Node.js/</id>
      <updated>2018-04-30T16:57:51+00:00</updated>
      <author>
        <name>Habeeb Bombata</name>
      </author>
    </entry>
  
</feed>
