Troubleshooting an Angular application in Intellij using Chrome on a Windows operating system

I've been searching for a long time for a way to debug an Angular app in IntelliJ using Chrome on Windows.

So far, I have not been successful in attaching a debugger to Chrome. I have tried launching Chrome with --remote-debugging-port=9222 and numerous other methods.

My current setup includes IntelliJ 2020.2 and Chrome 86.

If anyone has found a solution specifically for Windows, please share!

Answer №1

While using my Mac, I encountered a similar problem which I was able to resolve successfully. Hopefully, this solution will work for you too.

To address the issue, follow these steps:

Access Settings -> Tools -> Web Browsers and Preview

Locate the Chrome entry, and add --remote-allow-origins=* to the Command line options.

https://i.sstatic.net/yciKy.png

For more information, check out: https://www.reddit.com/r/IntelliJIDEA/comments/120faod/comment/jdk82yz/?utm_source=share&utm_medium=web2x&context=3

Answer №2

If you encounter this issue: Make sure that the browser has been launched successfully with the remote debugging port opened. The port cannot be opened if Chrome is already running with the same User Data Directory

Try deleting the following file:

~\AppData\Roaming\JetBrains\WebStorm2020.2\options\other.xml

If that doesn't resolve the issue, along with the previous step, delete this file as well:

~\AppData\Roaming\JetBrains\WebStorm2020.2\options\web-browsers.xml

And always remember to back up your files before making any changes.

Answer №3

To successfully run and debug your app, please follow these steps outlined in the help documentation:

  • Start your app by running the command npm start
  • Create a JavaScript Debug run configuration and specify your server URL (e.g., http://localhost:4200/)
  • Add breakpoints in your code where needed
  • Run the above debugging configuration

For more information on debugging Angular apps, visit this resource.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

MUI version 5 with styled-components and ListItemButton: The specified property 'to'/'component' is not recognized

While transitioning from MUI v4 to v5, I encountered a hurdle: in v4, I utilized makeStyles(), but now aim to fully switch to styled(). Unfortunately, I am struggling to get Typescript to recognize a styled(ListItemButton)(...) with to= and component= attr ...

Why is the function not being called when declaring a variable, resulting in a type error?

click here reference: const fn1 = (arg1: { key: number, })=>{ console.log(arg1) } fn1({ key: 1 }) const data = { key: 1, a: 1, } fn1(data) fn1({ key: 1, a: 1, }) more info Assistance needed: Why is ...

Can one invoke ConfirmationService from a different Service?

How can I declare an application-wide PrimeNG dialog and display it by calling ConfirmationService.confirm() from another service? Below is the HTML code in app.component.html: <p-confirmDialog [key]="mainDialog" class="styleDialog" ...

Managing Errors in Angular: Utilizing Interceptors and Modal Pop-ups

I recently finished developing an Angular 5 application that effectively handles errors for each API call made. By utilizing the HttpClient, I am able to catch errors that occur post request sent to the server. The error interception occurs within a servic ...

The property "props" is not recognized within the context of type PropType

Within my component, I am receiving a prop ("author") from a parent component. Although I have defined the prop type as "AuthorProps", I am getting an error stating Property 'author' does not exist on type 'AuthorProps', even though the ...

Using InjectionToken results in the generation of the error message "Encountered an issue while resolving symbol values

Recently, I encountered an issue while building my Ionic 3 app using ionic cordova build ios --prod. Everything was functioning perfectly until a package update caused some complications, preventing me from successfully building the app. I suspect that t ...

Waiting for the execution of the loop to be completed before proceeding - Typescript (Angular)

There's a code snippet triggered on an HTML page when clicked: public salaryConfirmation() { const matDialogConfig: MatDialogConfig = _.cloneDeep(GajiIdSettings.DIALOG_CONFIG); this.warningNameList = []; for(let i=0; i < this.kelolaDat ...

Enhancing Luxon DateTime with extension type support

Referencing the issue at https://github.com/moment/luxon/issues/260, I am looking to extend the DateTime object as shown below: import { DateTime } from 'luxon'; function fromUnix(tsp?: number): DateTime { return DateTime.fromMillis(tsp * 1000 ...

Encountering an issue with importing from 'sockjs-client' in TypeScript

I am a beginner with Angular and TypeScript. To get started, I used npm to install the following package: npm install --save sockjs-client I attempted to import it in my chat.component.ts file like this: import * as SockJS from 'sockjs-client'; ...

How to open a print preview in a new tab using Angular 4

Currently, I am attempting to implement print functionality in Angular 4. My goal is to have the print preview automatically open in a new tab along with the print popup window. I'm struggling to find a way to pass data from the parent window to the c ...

Method for Injecting Global Constants Provider in Angular 2

I am trying to implement a global constants setup in my Angular app, specifically with a root directory that should be accessible to every component without the need for manual imports. I came across a solution on Stack Overflow suggesting the use of a con ...

The issue persists in VSCode where the closing brackets are not being automatically added despite

Recently, I've noticed that my vscode editor is failing to automatically add closing brackets/parenthesis as it should. This issue only started happening recently. I'm curious if anyone else out there has encountered this problem with their globa ...

Setting the locale in an extended datapipe in Angular 4: A step-by-step guide

I have created a custom pipe by extending the DataPipe Angular class. import { Pipe, PipeTransform } from '@angular/core'; import { DatePipe } from '@angular/common'; @Pipe({ name: 'dateTimeFormater' }) export class DateTi ...

What method can be used to inherit the variable type of a class through its constructor

Currently, I am in the process of creating a validator class. Here's what it looks like: class Validator { private path: string; private data: unknown; constructor(path: string, data: string) { this.data = data; this.path = path; } ...

Steps to validate the execution of the ngCopy function in an Angular 6 unit test

While working on one of my angular components, I have implemented the ngCopy module to enable text copying to clipboard. The code snippet below showcases how I have used this module: import {Component, Input, OnInit} from '@angular/core'; import ...

Is it possible to establish a specific many-to-many relationship using Prisma?

In the Prisma documentation, it states that the set function can be used to override the value of a relation. const user = await prisma.user.update({ where: { email: '<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="73121f ...

Creating a declaration of an array containing key value pairs in Typescript

Feeling lost with the syntax provided below: constructor(controls: {[key: string]: AbstractControl}, optionals?: {[key: string]: boolean}, validator?: ValidatorFn, asyncValidator?: AsyncValidatorFn) I'm curious about the type of the controls (first ...

What is the process for ensuring that the "ng-multiselect-dropdown" is a mandatory field within Angular 7?

Is there a way to require the ng-multiselect-dropdown field to have at least one selected item? <ng-multiselect-dropdown [placeholder]="'Select countries'" [data]="countries" [(ngModel)]="countriesSelectedItems" [settings]="co ...

What are the steps to utilize kendo-fileselect in order to upload files from an Angular application to a C# web API?

We are integrating Kendo for Angular into our current project. In our existing system, we utilize kendo-upload which triggers a server call immediately. However, we cannot follow the same approach for this particular page. https://i.stack.imgur.com/qdn2b. ...

Angular service worker failing to cache APIs within the data groups array

Issue with Angular Service Worker Caching APIs I am encountering a problem where the Angular service worker is not caching APIs in the data groups array. Here is my ngsw-config.json file: { "$schema": "./node_modules/@angular/service-work ...