VSCode-Your IP Address in a Glance
Display the IP Address in your VSCode Status Bar with a single click.
THE PROBLEM STATEMENT
When you’re working in Visual Studio Code IDE, there comes a time when you require the IP Address on the machine your working on. It’s too much of a cumbersome job to open up the browser, depending upon your operating system; search the internet for the relevant commands that would display a long list of IP addresses and finally sort out the one that you require.
Also, it’s a frustrating job to repeat the process manually if the IP Address is not static. As a developer, you don’t want to waste your precious time by just going round and round all day.
THE SOLUTIONS WE MOSTLY ADOPT
FOR MICROSOFT WINDOWS
If your machine runs on Microsoft Windows Operating System, you would open up the command prompt and type ‘ipconfig’ that gives you a detailed result, as shown below.
FOR MAC OS
If you’re working on a Macintosh notebook, you would type ‘ifconfig’ in the terminal that produces a comprehensive output, as illustrated in the below figure.
FOR LINUX OS
If you’re using a Linux-based operating system, you would navigate to the bash terminal, type ‘ifconfig’, and yield such output as depicted in the below image.
THIRD-PARTY SOFTWARE
If you’re an expert, you would write a script in any programming language or some shell script that would trigger and give you the IP address.
If you’re scared of programming, you would want to stick to a simple user interface, online website, or third-party software that does the work for you. Below are few examples:
WHAT VSCODE HAS OFFERED
The Visual Studio Code is a free, lightweight cross-platform tool that provides a developer with a robust environment to carry out programming tasks with ease of comfort. One of its remarkable features is that it allows broad functionality by installing extensions from the VSCode Marketplace.
At this moment, I would also like to share my problem. To run the firebase local emulator suite on a physical device, I needed the primary IP address of my laptop. It was quite a time-wasting job to open up the terminal and get the IP address manually; especially if I lost the internet connection, I would need to redo the same flow again.
Thanks to Compulim for publishing the IP Address extension; now, I can see my desired IP address on the VSCode status bar in just a blink of an eye.
I can even insert the IP address from the command palette menu(pressing F1 or ctrl+shift+P or cmd+shift+P); see the below figure.
CONCLUSION
As a developer, I would say that it is a perfect solution that has saved my precious time, and I hope it will be time-saving for you. If you enjoyed this article, don’t press the clap button once; press it 50 times.
Level Up Coding
Thanks for being a part of our community! Subscribe to our YouTube channel or join the Skilled.dev coding interview course.