Deprecated: Creation of dynamic property Timber\Site::$pingback is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Site.php on line 180

Deprecated: Creation of dynamic property Timber\User::$name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/User.php on line 118

Deprecated: Creation of dynamic property Timber\Post::$os_meta is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$has_disclaimer is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_last is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_tipologia is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_attributi is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_in_evidenza_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_inviato_in_newsletter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_category is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_blz_affiliation_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_content_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_attributes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_primary_speciali is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskw is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_metadesc is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_focuskeywords is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_keywordsynonyms is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_estimated-reading-time-minutes is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_edit_lock is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_linkdex is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_wpseo_content_score is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_thumbnail_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$os_previous_publish_date is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$os_notification_id is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_yoast_indexnow_last_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_oembed_064f8b1f50a341d6db39fdeb05c3f2a3 is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_oembed_time_064f8b1f50a341d6db39fdeb05c3f2a3 is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$newsletter_subject is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_newsletter_subject is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$newsletter_summary is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$_newsletter_summary is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_date_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$ping_status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_password is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_name is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$to_ping is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$pinged is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_modified_gmt is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_content_filtered is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$guid is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$menu_order is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$post_mime_type is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$comment_count is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$filter is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71

Deprecated: Creation of dynamic property Timber\Post::$status is deprecated in /var/www/html/web/app/themes/ilsoftware/vendor/timber/timber/lib/Core.php on line 71
Chrome DevTools MCP: come l’AI accede al browser per analizzare errori e performance delle Web app | IlSoftware.it

Chrome DevTools MCP: come l’AI accede al browser per analizzare errori e performance delle Web app

Chrome DevTools MCP introduce la possibilità per gli agenti AI di collegarsi a una sessione Chrome attiva tramite remote debugging e analizzare DevTools, rete e performance.

Il debugging delle applicazioni Web non è sempre stato un processo immediato. Per molti anni individuare la causa di un errore o correggere un comportamento anomalo presupponeva un carico di lavoro non indifferente, totalmente manuale. Gli sviluppatori dovevano replicare scenari complessi, ricostruire sequenze di richieste HTTP e analizzare manualmente stack trace o comportamenti anomali del DOM ovvero della struttura della pagina Web. Anche con l’arrivo di strumenti avanzati come i Chrome DevTools (tasto F12), gran parte dell’analisi restava un lavoro altamente manuale: osservare i pannelli Network e Console, isolare il problema e poi tornare al codice per tentare una correzione.

L’integrazione dell’intelligenza artificiale negli strumenti di sviluppo modifica profondamente questo flusso operativo. In passato Chrome ha iniziato a introdurre funzionalità assistite nei DevTools per interpretare gli errori, suggerire miglioramenti al codice e aiutare nella lettura dei dati di performance. L’AI non si limita a generare spiegazioni o suggerimenti generici: può analizzare direttamente le informazioni raccolte dal browser durante l’esecuzione della pagina.

Supporto AI Chrome DevTools

Il passo successivo arriva con l’integrazione basata su Model Context Protocol (MCP), che consente a un agente AI specializzato nel coding di interagire in modo strutturato con una sessione reale del browser.

Il ruolo del Chrome DevTools MCP server

MCP è un servizio intermedio utilizzato, nel caso di Chrome, per esporre le funzionalità DevTools integrate nel browser agli AI.

Attraverso questo livello di integrazione, un assistente AI può interrogare il browser, analizzare richieste di rete, esaminare elementi del DOM o acquisire dati di performance senza dover ricorrere a strumenti esterni.

Il progetto open source chrome-devtools-mcp, presentato da Google a fine dicembre 2025, permette a strumenti come Gemini CLI, Cursor o altri coding agent compatibili di interagire con DevTools. L’agente non riceve solo testo o screenshot: accede direttamente ai dati diagnostici generati dal browser: informazioni sulle richieste HTTP, sugli errori JavaScript e sulle metriche di performance raccolte durante l’esecuzione della pagina.

Una caratteristica significativa riguarda la continuità tra debugging manuale e debugging assistito. Un developer può individuare un problema nel pannello Network o Elements di DevTools e delegare l’analisi all’agente AI senza cambiare ambiente di lavoro. L’oggetto selezionato nell’interfaccia DevTools diventa il punto di partenza dell’analisi automatizzata.

Come attivare l’accesso diretto alla sessione del browser

Per integrare i DevTools di Chrome con un agente AI che supporta il protocollo MCP, bisogna dapprima digitare quanto segue nella barra degli indirizzi:

chrome://inspect/#remote-debugging

Spuntando la casella Allow remote debugging for this browser instance, si autorizzano le connessioni di debug remoto, essenziali per consentire all’assistente AI di raccogliere informazioni, comprendere il problema da risolvere e intervenire direttamente sul codice della pagina.

Attivazione debug remoto Chrome DevTools

L’attivazione della connessione automatica avviene tramite il parametro --autoConnect del server MCP. Quando l’opzione è attiva, il servizio tenta di collegarsi a un’istanza Chrome già avviata e di richiedere l’apertura di una sessione di debugging remoto.

Il flusso deve comunque essere esplicitamente autorizzato dall’utente per motivi di sicurezza. Il browser mostra infatti una finestra di dialogo che chiede di autorizzare la sessione di debugging.

Finestra conferma debug remoto Chrome MCP

Solo dopo la conferma l’agente può accedere ai dati di DevTools. Durante l’esecuzione della sessione, Chrome visualizza anche un banner informativo che segnala il controllo del browser da parte di software automatizzato.

Integrazione assistente AI coding Chrome DevTools via MCP

L’integrazione consente agli agenti di lavorare direttamente sui dati provenienti dai pannelli principali di DevTools. Se una richiesta HTTP fallisce nel pannello Network, lo sviluppatore può selezionarla e chiedere all’agente di investigare il problema. L’assistente può quindi analizzare header, status code, tempi di risposta e dipendenze tra richieste.

Lo stesso approccio vale per il pannello Elements. Un nodo DOM selezionato nell’interfaccia DevTools diventa immediatamente disponibile per l’analisi dell’agente. In questo modo il sistema può suggerire correzioni relative a CSS, layout o script associati all’elemento.

La capacità di acquisire anche tracce di performance rende possibile analizzare rallentamenti o blocchi della pagina. Il server MCP può aprire una pagina Web e acquisire automaticamente una traccia di performance per esaminare tempi di rendering e attività del thread principale.

Verso un debugging collaborativo tra sviluppatore e AI

L’integrazione tra DevTools e agenti di coding apre una modalità di lavoro più fluida.

Lo sviluppatore mantiene il controllo diretto sull’interfaccia di debugging mentre l’assistente AI può analizzare i dati e proporre interventi sul codice. Il passaggio tra indagine manuale e analisi automatizzata avviene senza cambiare strumenti o contesto operativo.

Il progetto Chrome DevTools MCP rappresenta una fase iniziale di questa integrazione. Il team di sviluppo ha indicato l’intenzione di esporre progressivamente sempre più dati dei pannelli DevTools agli agenti AI.

Con l’espansione delle API disponibili, gli strumenti di sviluppo potranno delegare a sistemi automatici una parte crescente delle operazioni di diagnostica e ottimizzazione del codice.

Ti consigliamo anche

Link copiato negli appunti