I'm working with nextjs project on the vscode. From a few days ago, debug.log file generated automatically for any directory where I'm working with. I want to stop generating this debug.log automatically, or at least want to know how to add this debug.log to the gitignore. I added .log, debug.log, **/debug.log, but gitignore don't works.
VS Code maintains a debug session while the program is running, and pressing the Stop button terminates the program.
You can terminate with the Trash icon like you do, or press Ctrl + C . That's the shortcut from the default Terminal application and it also works in Visual Studio Code.
A launch. json file is used to configure the debugger in Visual Studio Code. Visual Studio Code generates a launch. json (under a . vscode folder in your project) with almost all of the required information.
Maybe you need to remove cached *.log
files in your project by running git rm --cached *.log
, then stage your .gitignore
file using git add .gitignore
or you can use git add .
My reference: How to use gitignore command in git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With