It seems that the issue you are experiencing may be linked to your configuration settings.
Here are the logs generated by a fresh Angular project on my system.
Logs after executing ng serve -c production
:
main-MVCVS4N4.js:1 Test logging
polyfills-LZBJRJJE.js:1 Angular is running in development mode.
Logs after running ng serve
(which defaults to development
configuration):
app.component.ts:16 Test logging
core.mjs:29995 Angular is running in development mode.
If necessary, you can create new Angular projects to compare your logs and review your angular.json
setup.
UPDATE
Ensure that source maps are enabled in Chrome as well.
With Chrome DevTools open and selected, press F1
to access the settings page.
Navigate to the Preferences
tab and confirm that the Enable JavaScript source maps
option is checked. Alternatively, you can click on the Restore defaults and reload
button located at the lower right corner of the same tab.
I conducted a test using the exact version you provided (16.0.1
) and obtained similar results. You should be able to observe the log message
Angular is running in development mode
.
If the issue persists, consider sharing the output from ng version
, along with details of your Chrome version and the specific steps taken to set up and serve a new Angular application.
If you are utilizing the Angular CLI, the process should be straightforward:
ng new app --defaults
cd app
ng serve -o