There's an extension available for Google Chrome for Visual Studio Code that greatly helps when debugging SPFx projects. To start using the extension, first install it in VS Code:
- Click on the EXTENSIONS pane in VS Code (or press Ctrl + Shift + X):

- Search for Debugger for Chrome and click on Install. Remember to reload VS Code window by clicking on the reload button to load this new extension.
- Now, we will need to introduce Chrome debugging for VS Code. Start by clicking on the debug icon on the left (or Ctrl + Shift + D):

- Then, click on No Configurations and on Add configuration:

- Select Chrome from the drop-down list.
- This creates a new launch.json configuration file to parametrize the configuration for debugging with Chrome. Remove all contents in the file and replace it with following:
{ "version": "0.2.0", "configurations": [ { "name": "Local workbench"...