Troubleshooting the DevTools extension - Microsoft Edge Developer documentation (2024)

  • Article
  • Make sure to open DevTools in one of the supported ways or scenarios. See Opening DevTools and the DevTools browser.

Controlling CSS mirror editing

By default, the CSS mirror editing checkbox is selected, in the Styles tab in the Elements tool in the Edge DevTools tab. If you change CSS values using DevTools, but DevTools doesn't find a matching file in a workspace (folder) that's open in Visual Studio Code, error messages about mapping to source files for CSS mirror editing appear.

If you are changing CSS in DevTools, either:

  • Select the CSS mirror editing checkbox and open a folder that contains source files that match the webpage that you are inspecting with DevTools.

  • Or, clear the CSS mirror editing checkbox, to prevent such error messages.

See also:

  • The CSS Mirror Editing checkbox in Update .css files from within the Styles tab (CSS mirror editing)
  • Mapping URL files to the opened folder in Opening DevTools and the DevTools browser.

A powerful way of restarting DevTools is to close and reopen the folder:

  1. In Visual Studio Code, select File > Close Folder.

  2. If you started a web server by using Terminal in Visual Studio Code, restart the web server, such as by running npx http-server. Or instead, you can start the web server from a command prompt outside of Visual Studio Code, so it keeps running. For more information, see Step 6: Set up a localhost server in Installing the DevTools extension for Visual Studio Code.

  3. In Visual Studio Code, select File > Open Recent, and open a folder that contains web page source files.

Closing all instances of DevTools

Normally, closing the two DevTools tabs closes any instances of DevTools and the DevTools browser. If the Debug toolbar is open, click the Stop button.

To reset the state of DevTools, close all instances of DevTools. Make sure the Launch Instance button is shown in Visual Studio Code > Activity Bar > Microsoft Edge Tools Side Bar. That indicates that no instance of DevTools is running.

If necessary, close all Visual Studio Code instances, then open Visual Studio Code, and make sure the Launch Instance button is shown in Activity Bar > Microsoft Edge Tools Side Bar.

Error messages

The solution for most error messages is to open DevTools in one of the recommended ways. Make sure a folder is open that contains webpage source files that DevTools can map to the file path or URL that the DevTools browser is using.

The DevTools browser uses the URL or file path that you specify any of the various ways:

Way of opening DevToolsWhere the file path or URL is specified
Click the Launch Instance button.The URL or file path that you specify in the DevTools browser's address bar.
Right-click an .html file.The path of the .html file that you right-click.
Click the Launch Project button.The URL or file path that you specify in launch.json.

If you enter a different URL or file path in the address bar of the DevTools browser, for DevTools to provide automatic CSS mirror editing of local source files, you must also open a folder that contains files that match the webpage (file path or URL) that you specify in the DevTools browser.

Suppose you click the Launch Instance button, then paste a localhost URL into the address bar, such as http://localhost:8080, but you don't have the local source files folder open. Then in the Styles tab of the Elements tool, try to change a CSS value. Error messages might appear, such as:

  • Error while mirroring css content to document. Could not mirror css changes to document. No workspace mapping was found.

  • Unable to open file in editor.

  • Error while opening file in editor.

  • Error while fetching.

  • Could not attach to main target.

  • Error while fetching list of available targets. No available targets to attach.

Troubleshooting the DevTools extension - Microsoft Edge Developer documentation (1)

If you get errors while trying to point to a file path, instead of using a launch.json file, try right-clicking the .html file instead:

Troubleshooting the DevTools extension - Microsoft Edge Developer documentation (2)

See Opening DevTools and the DevTools browser.

Deleting or re-creating launch.json

In addition to closing a reopening a folder, if you want to reset a project to use with DevTools, you can delete and optionally re-create launch.json. launch.json defines debug configurations.

The following launch.json file is too short for the DevTools extension. It was created by Visual Studio Code without using the DevTools extension. The Demos repo doesn't have launch.json in demo-to-do, so you might want to remove the file:

Troubleshooting the DevTools extension - Microsoft Edge Developer documentation (3)

To re-create a fresh launch.json file for DevTools:

  1. Make a backup copy of the launch.json file.

  2. In Visual Studio Code > Activity Bar > Explorer, right-click launch.json > Delete.

    Activity Bar > Microsoft Edge Tools now shows a Launch Instance button and a Generate launch.json button.

  3. If you want use a launch.json file for DevTools, make sure you have the desired folder open in Visual Studio Code > Activity Bar > Explorer, and then click the Generate launch.json button. See Opening DevTools by clicking the Launch Project button in Opening DevTools and the DevTools browser.

launch.json requires well-formed JSON

If Activity Bar > Microsoft Edge Tools contains a Configure launch.json button instead of the expected Launch Project button when a DevTools-generated launch.json file exists in the opened folder, this may be caused by adding a line with a missing comma or empty quotes. Be sure launch.json contains well-formed JSON.

See also

  • Get started using the DevTools extension for Visual Studio Code
  • Microsoft Edge DevTools extension for Visual Studio Code
  • Opening DevTools and the DevTools browser
Troubleshooting the DevTools extension - Microsoft Edge Developer documentation (2024)
Top Articles
M.A.S.H. - alles zur Serie - TV SPIELFILM
Vicky Stark's Age, Husband, Net Worth, Measurements - Wiki
LOST JEEPS • View forum
Flanagan-Watts Funeral Home Obituaries
Tony's Delicatessen & Fresh Meats
Fresenius Medical Care to launch 5008 dialysis machine: improved patients` quality of life and efficient use of resources
Endicott Final Exam Schedule Fall 2023
Dtm Urban Dictionary
United Center Section 305
Trey Yingst Parents Nationality
Hangar 67
Elanco Rebates.com 2022
M3Gan Showtimes Near Regal City North
Uca Cheerleading Nationals 2023
Aussiebigdaddik
Charm City Kings 123Movies
Spicy Bourbon Pumpkin Pie
Black Adam Showtimes Near Linden Boulevard Multiplex Cinemas
Fox News Live Stream USA HD - USNewsON
Bilt Rent Day Challenge June 2023 Answers
Age Gabriela Moura's Evolution from Childhood Dreams to TikTok Fame - Essential Tribune
Gw2 Blue Prophet Shard
Hendraheim Skyrim
Palmer Santin Funeral Home Fullerton Nebraska Obituaries
Duitse Rechtspraak: is de Duitse Wet op het minimumloon wel of niet van toepassing op buitenlandse transportondernemingen? | Stichting Vervoeradres
1946 Chevy Truck For Sale Craigslist
Creator League Standings
Acnh Picnic Table
Storenet Walgreens At Home
Ixl Sbisd Login
Harleyxwest Of Leaks
Mikayla Campinos: The Rising Star Of EromeCom
Hux Lipford Funeral
The Nun 2 Showtimes Near Cinemark Towson And Xd
Craigslist Musicians Phoenix
Cornerstone Okta T Mobile
OSRS F2P Melee Combat Guide: Fastest Way From 1-99
Barney Min Wiki
Transformers Movie Wiki
Dr Roger Rosenstock Delray Beach
Fuzz Bugs Factory Hop Halloween
Make An Appointment Att
Ohio State Football Wiki
Moviesverse 2023
Kens5 Great Day Sa
Subway Surfers Unblocked 76
German American Bank Owenton Ky
Bbc Numberblocks
102Km To Mph
Dukes Harley Funeral Home Orangeburg
Siswa SMA Rundung Bocah SD di Bekasi, Berawal dari Main Sepak Bola Bersama
Houses and Apartments For Rent in Maastricht
Latest Posts
Article information

Author: Rev. Porsche Oberbrunner

Last Updated:

Views: 5545

Rating: 4.2 / 5 (73 voted)

Reviews: 80% of readers found this page helpful

Author information

Name: Rev. Porsche Oberbrunner

Birthday: 1994-06-25

Address: Suite 153 582 Lubowitz Walks, Port Alfredoborough, IN 72879-2838

Phone: +128413562823324

Job: IT Strategist

Hobby: Video gaming, Basketball, Web surfing, Book restoration, Jogging, Shooting, Fishing

Introduction: My name is Rev. Porsche Oberbrunner, I am a zany, graceful, talented, witty, determined, shiny, enchanting person who loves writing and wants to share my knowledge and understanding with you.