I'm working on an Angular 4 project in Visual Studio Code. Is there any way to stop it from endlessly recompiling? 'Ng serve' is the command I use. Ideally, what I would like Visual Studio Code to do is to rebuild automatically when I make changes, but not to get into a cycle of constant rebuilding and rebuilding without end, even when no changes are made. In those circumstances all I can do is CTRL-C to end the loop, and enter 'Ng serve' again. Does anyone know how to do that?
You can stop any running command by pressing Ctrl + C on your keyboard.
VS Code maintains a debug session while the program is running, and pressing the Stop button terminates the program.
Just change it to "files. autoSave": "off", (which is the default). So your compilation should now only be triggered when you save..
Once you launch Angular application, the terminal still shows the previous command and it will not let you execute any other CLI command. To stop your angular application use the following command. This command will ask you to Terminate batch job(Y/N)?. Type Y and press Enter key.
Setting the watch option false will stop automatic rebuilds:
ng serve --watch=false
The full list of ng serve options are here, or use --help after the command.
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