4

Im developing React Native app with Visual Studio Code now, but something like a debugger, I dont know what is called, appeared in code somehow.

I think this is a function of VS code. I want to remove debugger from my package.json, but I can't search solutions because I don't know what it is called..

this debuger appeared

this debuger appeared

when I press this, search window appear

enter image description here

Someone know how can I remove this? Thank you your answers!

my env VS Code: v1.47.2 Macbook Pro OS:Catalina 10.15.4

Hunter Tran
  • 13,257
  • 2
  • 14
  • 23
Odayan
  • 51
  • 1
  • 1
  • 4

1 Answers1

1

Possible duplicate: How to disable `Debug` from showing in package.json

To remove (or "delete") the debugger open the VSCode settings file and add or modify this line:

 "debug.javascript.codelens.npmScripts": "never",

or

enter image description here

Anyway, that is just a function for you to quickly launch the debugging session. Nothing added to your code.

When you press "debug", because you don't specify which script to run, VSCode shows you a list of options for you to choose. Use the up and down buttons to select.

If you hover your mouse a script, a small "tooltips" appear, click on it to run the script under the mouse.

enter image description here

In this picture, if I click Run Script, the terminal windows will run npm run compile

Hunter Tran
  • 13,257
  • 2
  • 14
  • 23
  • Don't want to downvote, because it's valuable information to new users, but it would be good to at least address the main question of `How can I remove VS code debugger?`, in my opinion anyways – soulshined Jul 27 '20 at 16:17
  • I think OP is thinking VSCode adds something to the code, therefor asking for a way to "remove" it. Also, OP don't familiar with the VSCode dialogue box, as he misunderstands it with a search box. So I assumed OP is new to vscode. – Hunter Tran Jul 27 '20 at 20:13
  • 1
    It technically is adding something to the [editor] code. I'm not saying your answer isn't helpful, it just doesn't address the question. They want to remove it, and there is a way to do so – soulshined Jul 27 '20 at 20:21
  • thank you your answer! Sorry for my bad asking, Im very new to VS code. The reason that I said I want to remove is , if I build up my react-native app with expo, command expo start, Error happens.. Expo open browser and expo says "Error Loading DebugTools". before yesterday, I never see this error, But debug function appeared, Expo start showing error.. I did run app from small tooltips you told me, app build with no problem. Actually I really want to remove it but my heavy problem disappeard. Anyway Thanks! – Odayan Jul 27 '20 at 23:22
  • By the way, is there some way to remove it? (Im saying no to remove from VS CODE, I just want to disappear it) Or this is always appear everyone's code? – Odayan Jul 27 '20 at 23:28
  • @Odayan you can review the comment i posted on your question. This question is essentially a duplicate – soulshined Jul 27 '20 at 23:37
  • @Odayan I think something wrong with the code itself, not the vscode. You can try to run your react-native app from a command prompt without vscode. Otherwise, you can always ask a new question. – Hunter Tran Jul 28 '20 at 00:28
  • 1
    @Tuan I could understand what you advised! I edit VS code setting, script debugger => never I could make debugger disabled!! Thank you so much! – Odayan Jul 28 '20 at 03:35
  • This answer is valuable. BTW, there is another option need to be turned off, `Jest: Enable Code Lens`. Only this is OFF, that `Debug` can be gone. – harrrrrrry May 28 '22 at 17:57
  • nice one thanks alot man – kaybrian Jul 17 '23 at 11:14