Remove all console.log() from your project in less than a minute

Introduction

console.log() is a debugging tool that can assist you to figure out what your code is doing. You may follow along as your code executes by displaying a message that contains either descriptive text that tells you what’s going on…


This content originally appeared on DEV Community and was authored by Suhail Kakar

Introduction

console.log() is a debugging tool that can assist you to figure out what your code is doing. You may follow along as your code executes by displaying a message that contains either descriptive text that tells you what's going on or the values of certain variables.

Removing all console.log() from your project before production can be very difficult, Here is how to remove all console.log() from your project in less than a minute.

Step 1

Open your project in VS Code ( Since we are using Regex, It is easier to use it in VS Code )

Step 2

Click on the search icon on VS Code sidebar. It will open the search option

screely-1629616174912.png

Step 3

In search placeholder type console.log.*$ and select Use Regex option which can be found on the upper right corner of the search panel that’s designated by the icon .*

screely-1629615942100.png

Step 4

Once you searched for all the console.log(), Click on replace to remove all console.log()
and BOOM ? Now you don't have any console.log() in your project

Conclusion ⌛

I hope you found this short helpful. If you need any help please let me know in the comment section.

Let's connect on Twitter and LinkedIn

? Thanks for reading, See you next time


This content originally appeared on DEV Community and was authored by Suhail Kakar


Print Share Comment Cite Upload Translate Updates
APA

Suhail Kakar | Sciencx (2021-08-22T07:40:35+00:00) Remove all console.log() from your project in less than a minute. Retrieved from https://www.scien.cx/2021/08/22/remove-all-console-log-from-your-project-in-less-than-a-minute/

MLA
" » Remove all console.log() from your project in less than a minute." Suhail Kakar | Sciencx - Sunday August 22, 2021, https://www.scien.cx/2021/08/22/remove-all-console-log-from-your-project-in-less-than-a-minute/
HARVARD
Suhail Kakar | Sciencx Sunday August 22, 2021 » Remove all console.log() from your project in less than a minute., viewed ,<https://www.scien.cx/2021/08/22/remove-all-console-log-from-your-project-in-less-than-a-minute/>
VANCOUVER
Suhail Kakar | Sciencx - » Remove all console.log() from your project in less than a minute. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2021/08/22/remove-all-console-log-from-your-project-in-less-than-a-minute/
CHICAGO
" » Remove all console.log() from your project in less than a minute." Suhail Kakar | Sciencx - Accessed . https://www.scien.cx/2021/08/22/remove-all-console-log-from-your-project-in-less-than-a-minute/
IEEE
" » Remove all console.log() from your project in less than a minute." Suhail Kakar | Sciencx [Online]. Available: https://www.scien.cx/2021/08/22/remove-all-console-log-from-your-project-in-less-than-a-minute/. [Accessed: ]
rf:citation
» Remove all console.log() from your project in less than a minute | Suhail Kakar | Sciencx | https://www.scien.cx/2021/08/22/remove-all-console-log-from-your-project-in-less-than-a-minute/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.