Stanislav Mayorov
Stanislav Mayorov

Reputation: 4452

How to delete all debugger in WebStorm?

What's the easiest way to delete all debugger commands in a whole project using WebStorm?

it's a problem for me because sometimes I accidentally commit it.

enter image description here

Upvotes: 0

Views: 198

Answers (2)

Yury Fedorov
Yury Fedorov

Reputation: 14938

Use Ctrl+Shift+R (in Windows or Linux, and something different in Mac), or go to Edit -> Find -> Replace in Path to use the "Replace in Path" feature. Write debugger; into the search bar, clear the contents of the replace bar, select the In Project scope and try to execute the command. Make sure to verify that you don't accidentally replace something that you need (use preview).enter image description here

Update: If you'd like to remove the entire string, use the following regular expression: ^\s+debugger;\s+$. Don't forget to select the "Regex" check box.

Upvotes: 1

amhev
amhev

Reputation: 333

you can replace all debugger; with an empty string.

Go to:

Edit->File->Replace In Path

Text to find: debugger;.

leave the Replace with input empty. In the Scope section choose the Whole project.

Upvotes: 0

Related Questions