# Tutorial: Supercharged Cursor composer agent with Chrome DevTools

**URL:** <https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394>\
**Category:** Built for Cursor\
**Created:** [February 16, 2025, 5:23pm UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394 "2025-02-16T17:23:25Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![MaxTeabag](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/maxteabag/32/26732_2.png) [@MaxTeabag](https://forum.cursor.com/u/MaxTeabag)\
**Post date:** [February 16, 2025, 5:23pm UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/1 "2025-02-16T17:23:25Z")

</div>

# Chrome Remote Debugging with Custom Console and Network Monitor

This documentation describes a simple but powerful setup for monitoring both console logs and network activity in a Chrome instance, particularly useful for debugging web applications.

## Features

This setup enables the composer agent to have live access to the google chrome logs and network activity and can take initiative on using it.

## Use Cases

You can ask the agent various debugging-related questions, such as:

1. “Based on console logs, what is the pet store id?”
2. “Fix the console errors”

Since the agent has live access to the output, you can ask it to fix console errors, then re-read the new console logs upon refreshing the page, and repeat, automatically.

## Setup Instructions

Please refer to [cursor-chrome-composer](https://github.com/Maxteabag/cursor-chrome-composer) for the setup, as you need to create a Javascript file that the agent can execute.

## How it works

### Chrome Remote Debugging Mode

- Opens a WebSocket server for external connections
- Exposes Chrome DevTools Protocol (CDP) API

### cursor-composer.js Script

The script performs the following functions:

- Connects to Chrome’s WebSocket server
- Uses CDP to:
  - Subscribe to console events
  - Monitor network activity
  - Execute commands
  - Receive real-time updates

### Result

Through this pipeline, the Composer gains live access to the browser’s console and network activity, because the agent can execute the javascript file in a new terminal tab, thus having the output in its context at all times.

---

<div class="post-metadata">

**Author:** ![Agnos](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/agnos/32/2183_2.png) [@Agnos](https://forum.cursor.com/u/Agnos)\
**Post date:** [February 17, 2025, 2:49pm UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/2 "2025-02-17T14:49:21Z")

</div>

> Important: You must make sure the agent runs the command NOT in the composer chat as an embedded terminal - but as a terminal as a editor, so the application doesn’t shut down automatically and you can keep in the context across composers.

Can we do that??? So the Agent will use the terminal directly and not in his chat?

---

<div class="post-metadata">

**Author:** ![MaxTeabag](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/maxteabag/32/26732_2.png) [@MaxTeabag](https://forum.cursor.com/u/MaxTeabag)\
**Post date:** [February 17, 2025, 5:18pm UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/4 "2025-02-17T17:18:36Z")

</div>

I found out…

If the composer opens a terminal embedded, you can choose to make it a “pop up terminal” and then when it’s in the terminal pane, right click on the terminal and “Move terminal into Editor Area,” this way, the composer can get access to a long running script’s terminal output

 ![image](https://us1.discourse-cdn.com/cursor1/original/3X/7/b/7b0d237ff856bfe650302d7c593655e9ed009e33.png)

---

<div class="post-metadata">

**Author:** ![saketsarin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/saketsarin/32/25671_2.png) [@saketsarin](https://forum.cursor.com/u/saketsarin)\
**Post date:** [February 17, 2025, 7:40pm UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/5 "2025-02-17T19:40:07Z")

</div>

great work man!

i also launched something similar for fetching browser logs, network reqs, and current screenshot of the webpage directly into composer so its easier to debug. check it out here - [x.com](https://x.com/SaketSarin/status/1890143641810923563)

> **[GitHub - saketsarin/composer-web: Cursor extension that forwards frontend errors and...](https://github.com/saketsarin/composer-web)**
>
> Cursor extension that forwards frontend errors and screenshots to composer in one-click, making development seamless for you

---

<div class="post-metadata">

**Author:** ![MaxTeabag](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/maxteabag/32/26732_2.png) [@MaxTeabag](https://forum.cursor.com/u/MaxTeabag)\
**Post date:** [February 18, 2025, 6:58am UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/6 "2025-02-18T06:58:27Z")

</div>

Seems really cool but unfortunately I couldn’t get it to work:

> Capture failed: Command failed: powershell -command “Set-Clipboard -Value ‘’” Set-Clipboard : Value cannot be null. Parameter name: text At line:1 char:1 + Set-Clipboard -Value ‘’ + ~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: ( : ) [Set-Clipboard], ArgumentNullException + FullyQualifiedErrorId : System.ArgumentNullException,Microsoft.PowerShell.Commands.SetClipboardCommand

---

<div class="post-metadata">

**Author:** ![saketsarin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/saketsarin/32/25671_2.png) [@saketsarin](https://forum.cursor.com/u/saketsarin)\
**Post date:** [February 18, 2025, 7:02am UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/7 "2025-02-18T07:02:55Z")

</div>

ah yes this is known. i made this on mac and used a vm to test for windows but this issue is happening for actual windows users.

would really appreciate if you could contribute to the repo and fix this. it’s just one line of code where the powershell command needs to be fixed

also it looks like theres no logs on the tab that you’re trying to fetch from. did you perform the actions that log to console after connecting to the tab from cursor?

---

<div class="post-metadata">

**Author:** ![MaxTeabag](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/maxteabag/32/26732_2.png) [@MaxTeabag](https://forum.cursor.com/u/MaxTeabag)\
**Post date:** [February 19, 2025, 3:38pm UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/8 "2025-02-19T15:38:58Z")

</div>

I updated the repo with a more powerful way of doing this, using playwright.

This mean that you don’t need to add a new chrome instance manually, fetch the id and connect it to the monitor. With playwright, it does this automatically.

Also with playwright. you can run automated tasks which is monitored.

So an example scenario to use it is:

1. There a bug in your CreatePet component
2. Tell the composer to create a playwright script to navigate to it, expending BaseMonitor and using existing modules (e.g. logging in). Make the playwright script instanitate BaseMonitor with ExitOnError = true.
3. Now tell the composer “Run the NavigateToCreatePet script, read the errors, and fix it, and run the script until it works.”
4. The composer will hopefully run it, a chromium browser will appear and it will navigate to the page, all console logs in the context of the composer
5. Since ExitOnError is true, when it encounters an error, the script execution is stopped, and the composer can read the final output (which is the error console message) . From there it should get a stacktrace, fix the error, and then run the procedure again.

I’ve used this process to fix one bug so far. It was pretty cool.

(+ made some features for clearing the console upon refresh, etc)

---

<div class="post-metadata">

**Author:** ![MaxTeabag](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/maxteabag/32/26732_2.png) [@MaxTeabag](https://forum.cursor.com/u/MaxTeabag)\
**Post date:** [February 19, 2025, 3:42pm UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/9 "2025-02-19T15:42:36Z")

</div>

I’ve never worked on vscode extensions before. I had no idea how complex the problem is. Altho right now I think this monitor is working fine.

---

<div class="post-metadata">

**Author:** ![saketsarin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/saketsarin/32/25671_2.png) [@saketsarin](https://forum.cursor.com/u/saketsarin)\
**Post date:** [February 20, 2025, 11:56am UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/10 "2025-02-20T11:56:16Z")

</div>

Hey Max!

I’ve fixed the windows issue in the latest release: [Release v1.0.4 · saketsarin/composer-web · GitHub](https://github.com/saketsarin/composer-web/releases/tag/v1.0.4)

Do try it out and let me know if you still face any issues there.

Thanks

---

<div class="post-metadata">

**Author:** ![MaxTeabag](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/maxteabag/32/26732_2.png) [@MaxTeabag](https://forum.cursor.com/u/MaxTeabag)\
**Post date:** [February 21, 2025, 8:52am UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/11 "2025-02-21T08:52:33Z")

</div>

Cool, I’ll check it out. Thanks for making this

---

<div class="post-metadata">

**Author:** ![saketsarin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/saketsarin/32/25671_2.png) [@saketsarin](https://forum.cursor.com/u/saketsarin)\
**Post date:** [February 21, 2025, 9:24am UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/12 "2025-02-21T09:24:25Z")

</div>

Appreciate it 🙌🏻

---

<div class="post-metadata">

**Author:** ![mason-os](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/mason-os/32/18809_2.png) [@mason-os](https://forum.cursor.com/u/mason-os)\
**Post date:** [February 21, 2025, 3:27pm UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/13 "2025-02-21T15:27:21Z")

</div>

I’d been trying to figure out how to get pre-existing terminals into the composer! It is so useful when it spins up a background terminal on its own. This has helped me a ton!

I’d started out with a lazier approach of using the the [Edge Dev Tools](https://learn.microsoft.com/en-us/microsoft-edge/visual-studio-code/microsoft-edge-devtools-extension/console-integration#console-during-run-and-debug) extension for VS Code. Using the debug console mode, which helped expose some of the runtime info but not as much as it looks like the CDP API does!

---

<div class="post-metadata">

**Author:** ![MaxTeabag](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/maxteabag/32/26732_2.png) [@MaxTeabag](https://forum.cursor.com/u/MaxTeabag)\
**Post date:** [February 22, 2025, 12:11pm UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/14 "2025-02-22T12:11:39Z")

</div>

Happy to help! And now this method is more convenient in 0.46 you can reference terminals in the composer with @

---

<div class="post-metadata">

**Author:** ![oldercodergithub](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/oldercodergithub/32/28370_2.png) [@oldercodergithub](https://forum.cursor.com/u/oldercodergithub)\
**Post date:** [May 17, 2025, 12:32pm UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/15 "2025-05-17T12:32:00Z")

</div>

Since yours is more straightforward than the script solution first I tried the extension.  
I develop a project on a remote server with public ipv4. Cursor is being used on my home workstation and It is connected to that remote server via SSH.

While still working on it I test this app on my local browser.

I found that the extension is failing possibly by assuming both browser and cursor are on the same host.

I am a newbie. May be I did something wrong. Just wanted to report on what I experienced hoping I might contribute.

Thanks a lot for your great work.

---

<div class="post-metadata">

**Author:** ![saketsarin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/saketsarin/32/25671_2.png) [@saketsarin](https://forum.cursor.com/u/saketsarin)\
**Post date:** [May 25, 2025, 2:10pm UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/16 "2025-05-25T14:10:29Z")

</div>

hey @oldercodergithub

thanks for the feedback. i believe you reached out on github discussions too? i believe that the issue you’re facing is that cursor and chrome debug host are supposed to run on the same host to work properly together. this happened to one of our other users before and i shared that discussion link with you on github. do reach out if you need more help 😃

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 18, 2026, 10:43am UTC](https://forum.cursor.com/t/tutorial-supercharged-cursor-composer-agent-with-chrome-devtools/51394/17 "2026-06-18T10:43:54Z")

</div>

Closed on June 18, 2026, 10:43am UTC


