You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Opening a local HTML file from File Explorer and editing it in DevTools
337
336
338
-
To edit files in the **Sources** tool, before doing the steps in this section, you might need to click the **Allow** button to grant read/write access by following the steps in [Opening a folder from the Workspace tab in the Sources tool](#opening-a-folder-from-the-workspace-tab-in-the-sources-tool) above.
337
+
To edit files in the **Sources** tool, before doing the steps in this section, you might need to click the **Allow** button to grant read/write access by following the steps in [Open a demo folder from the Workspace tab in the Sources tool](#open-a-demo-folder-from-the-workspace-tab-in-the-sources-tool), above.
339
338
340
339
1. In File Explorer on Windows, or Finder on macOS, select an HTML file from the local copy of the **Demos** repo, such as `C:\Users\localAccount\Documents\GitHub\Demos\demo-to-do\index.html`.
341
340
@@ -380,7 +379,7 @@ To open an `.html` file and edit it:
380
379
<h1>📋 My modified tasks</h1>
381
380
```
382
381
383
-
If editing isn't enabled, click the **Allow** button to grant read/write access to the folder by doing the steps in [Opening a folder from the Workspace tab in the Sources tool](#opening-a-folder-from-the-workspace-tab-in-the-sources-tool) above.
382
+
If editing isn't enabled, click the **Allow** button to grant read/write access to the folder by doing the steps in [Open a demo folder from the Workspace tab in the Sources tool](#open-a-demo-folder-from-the-workspace-tab-in-the-sources-tool) above.
384
383
385
384
The change is displayed in the **Changes** tool in the **Quick View** panel, and an asterisk is added to the file name in the **index.html** tab in the **Sources** tool:
386
385
@@ -449,7 +448,7 @@ When you run a localhost server and start it within a cloned repo folder, such a
449
448
450
449
Opening and editing files:
451
450
*[Edit and save files in a workspace](../workspaces/index.md) - to open a local folder in the **Sources** tool of DevTools in the browser.
452
-
*[Select a local Workspace, to use DevTools to edit files and save changes to disk](../sources/index.md#select-a-local-workspace-to-use-devtools-to-edit-files-and-save-changes-to-disk) in _Sources tool overview_.
451
+
*[Add a local folder to the workspace, to use DevTools to edit files and save changes to disk](../sources/index.md#add-a-local-folder-to-the-workspace-to-use-devtools-to-edit-files-and-save-changes-to-disk) in _Sources tool overview_.
453
452
*[Approaches compared](../../visual-studio-code/microsoft-edge-devtools-extension.md#approaches-compared) in _Microsoft Edge DevTools extension for Visual Studio Code_. Summarizes and compares several options for editing webpage files.
454
453
*[Microsoft Edge IDE integration](../../visual-studio-code/ide-integration.md) - Webpage app development using Visual Studio Code or Visual Studio, including Microsoft Edge DevTools.
Copy file name to clipboardExpand all lines: microsoft-edge/devtools-guide-chromium/sources/index.md
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,10 +28,13 @@ Use the **Sources** tool to view, modify, and debug front-end JavaScript code, a
28
28
29
29
**Detailed contents:**
30
30
31
+
[Add a local folder to the workspace, to use DevTools to edit files and save changes to disk](#add-a-local-folder-to-the-workspace-to-use-devtools-to-edit-files-and-save-changes-to-disk)
32
+
33
+
31
34
*[The Navigator, Editor, and Debugger panes](#the-navigator-editor-and-debugger-panes)
32
35
*[Using the Navigator pane to select files](#using-the-navigator-pane-to-select-files)
33
36
*[Using the Page tab to explore resources that construct the current webpage](#using-the-page-tab-to-explore-resources-that-construct-the-current-webpage)
34
-
*[Select a local Workspace, to use DevTools to edit files and save changes to disk](#select-a-local-workspace-to-use-devtools-to-edit-files-and-save-changes-to-disk)
37
+
*[Add a local folder to the workspace, to use DevTools to edit files and save changes to disk](#add-a-local-folder-to-the-workspace-to-use-devtools-to-edit-files-and-save-changes-to-disk)
35
38
*[Using the Overrides tab to override server files with local files](#using-the-overrides-tab-to-override-server-files-with-local-files)
36
39
*[Using the Content scripts tab for Microsoft Edge extensions](#using-the-content-scripts-tab-for-microsoft-edge-extensions)
37
40
*[Using the Snippets tab to run JavaScript code snippets on any webpage](#using-the-snippets-tab-to-run-javascript-code-snippets-on-any-webpage)
@@ -108,7 +111,7 @@ The Navigator pane contains the following tabs:
108
111
| Tab | Description | Docs |
109
112
|---|---|
110
113
|**Page**| View the resources that the browser downloaded from the server or file system, inspect their content, and debug code. |[Using the Page tab to explore resources that construct the current webpage](#using-the-page-tab-to-explore-resources-that-construct-the-current-webpage)|
111
-
|**Workspace**| View and edit local files in DevTools, to use DevTools as an Integrated Development Environment (IDE) within the browser. |[Select a local Workspace, to use DevTools to edit files and save changes to disk](#select-a-local-workspace-to-use-devtools-to-edit-files-and-save-changes-to-disk)|
114
+
|**Workspace**| View and edit local files in DevTools, to use DevTools as an Integrated Development Environment (IDE) within the browser. |[Add a local folder to the workspace, to use DevTools to edit files and save changes to disk](#add-a-local-folder-to-the-workspace-to-use-devtools-to-edit-files-and-save-changes-to-disk)|
112
115
|**Overrides**| Experiment with changes to a webpage, and keep the changes after you refresh the webpage, without mapping your changes to the source code of the webpage. |[Using the Overrides tab to override server files with local files](#using-the-overrides-tab-to-override-server-files-with-local-files)|
113
116
|**Content scripts**| View content scripts that were loaded by a Microsoft Edge extension. |[Using the Content scripts tab for Microsoft Edge extensions](#using-the-content-scripts-tab-for-microsoft-edge-extensions)|
114
117
|**Snippets**| Create and save JavaScript code snippets, so that you can easily run a snippet of JavaScript on any webpage. |[Using the Snippets tab to run JavaScript code snippets on any page](#using-the-snippets-tab-to-run-javascript-code-snippets-on-any-webpage)|
@@ -201,7 +204,7 @@ Workspaces work well when the JavaScript code that's returned by the server is t
201
204
202
205
See also:
203
206
*[Edit and save files in a workspace](../workspaces/index.md)
204
-
*[Open a demo folder in the Sources tool and edit a file](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-in-the-sources-tool-and-edit-a-file) in _Sample code for DevTools_.
207
+
*[Open a demo folder from the Workspace tab in the Sources tool](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-from-the-workspace-tab-in-the-sources-tool)
205
208
206
209
207
210
<!-- ------------------------------ -->
@@ -318,7 +321,7 @@ The **Editor** pane has the following level of support for various file types:
318
321
| HTML | View and edit. |
319
322
| Images | View. |
320
323
321
-
By default, edits are discarded when you refresh the webpage. For information about how to save the changes to your file system, see [Select a local Workspace, to use DevTools to edit files and save changes to disk](#select-a-local-workspace-to-use-devtools-to-edit-files-and-save-changes-to-disk), above.
324
+
By default, edits are discarded when you refresh the webpage. For information about how to save the changes to your file system, see [Add a local folder to the workspace, to use DevTools to edit files and save changes to disk](#add-a-local-folder-to-the-workspace-to-use-devtools-to-edit-files-and-save-changes-to-disk), above.
322
325
323
326
The following subsections cover the Editor pane:
324
327
*[Editing a JavaScript file](#editing-a-javascript-file)
@@ -331,7 +334,7 @@ The following subsections cover the Editor pane:
331
334
*[Quick source tool, to display source files when using a different tool](#quick-source-tool-to-display-source-files-when-using-a-different-tool)
332
335
333
336
See also:
334
-
*[Open a demo folder in the Sources tool and edit a file](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-in-the-sources-tool-and-edit-a-file) in _Sample code for DevTools_.
337
+
*[Open a demo folder from the Workspace tab in the Sources tool](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-from-the-workspace-tab-in-the-sources-tool)
335
338
336
339
337
340
<!-- ------------------------------ -->
@@ -344,7 +347,7 @@ To edit a JavaScript file in DevTools, use the **Editor** pane, within the **Sou
344
347
To load a file into the Editor pane, use the **Page** tab in the **Navigator** pane (on the left). Or use the **Command Menu**, as follows: in the upper right of DevTools, select **Customize and control DevTools** (**...**) and then select **Open File**.
345
348
346
349
See also:
347
-
*[Open a demo folder in the Sources tool and edit a file](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-in-the-sources-tool-and-edit-a-file) in _Sample code for DevTools_.
350
+
*[Open a demo folder from the Workspace tab in the Sources tool](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-from-the-workspace-tab-in-the-sources-tool)
348
351
349
352
350
353
###### Save and Undo
@@ -453,7 +456,7 @@ CSS changes take effect immediately; you don't need to manually save the changes
453
456
See also:
454
457
*[Edit CSS font styles and settings in the Styles pane](../inspect-styles/edit-fonts.md)
455
458
*[Sources tool keyboard shortcuts](../shortcuts/index.md#sources-tool-keyboard-shortcuts) in _Keyboard shortcuts_
456
-
*[Open a demo folder in the Sources tool and edit a file](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-in-the-sources-tool-and-edit-a-file) in _Sample code for DevTools_.
459
+
*[Open a demo folder from the Workspace tab in the Sources tool](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-from-the-workspace-tab-in-the-sources-tool)
457
460
458
461
459
462
<!-- ---------- -->
@@ -481,7 +484,7 @@ There are two ways to edit HTML in DevTools:
481
484

482
485
483
486
Unlike a JavaScript or CSS file, an HTML file that is returned by the web server cannot be directly edited in the Sources tool. To edit an HTML file using the Editor of the Sources tool, the HTML file must be in a Workspace or on the **Overrides** tab. See these subsections of the current article:
484
-
*[Select a local Workspace, to use DevTools to edit files and save changes to disk](#select-a-local-workspace-to-use-devtools-to-edit-files-and-save-changes-to-disk)
487
+
*[Add a local folder to the workspace, to use DevTools to edit files and save changes to disk](#add-a-local-folder-to-the-workspace-to-use-devtools-to-edit-files-and-save-changes-to-disk)
485
488
*[Using the Overrides tab to override server files with local files](#using-the-overrides-tab-to-override-server-files-with-local-files)
486
489
487
490
To save changes, press **Ctrl+S** on Windows/Linux or **Command+S** on macOS. An edited file is marked by an asterisk.
@@ -493,7 +496,7 @@ To undo an edit, press **Ctrl+Z** on Windows/Linux or **Command+Z** on macOS.
493
496
To view other commands while editing an HTML file, in the Editor pane, right-click the HTML file.
494
497
495
498
See also:
496
-
*[Open a demo folder in the Sources tool and edit a file](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-in-the-sources-tool-and-edit-a-file) in _Sample code for DevTools_.
499
+
*[Open a demo folder from the Workspace tab in the Sources tool](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-from-the-workspace-tab-in-the-sources-tool)
497
500
498
501
499
502
<!-- ------------------------------ -->
@@ -664,7 +667,7 @@ The following articles cover the **Debugger** pane and breakpoints:
* [Open a demo folder in the Sources tool and edit a file](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-in-the-sources-tool-and-edit-a-file) in _Sample code for DevTools_.
670
+
* [Open a demo folder from the Workspace tab in the Sources tool](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-from-the-workspace-tab-in-the-sources-tool)
668
671
* [Sources tool keyboard shortcuts](../shortcuts/index.md#sources-tool-keyboard-shortcuts) in _Keyboard shortcuts_.
669
672
* [Display or edit source files using the Quick source tool](../quick-source/quick-source-tool.md)
670
673
* [Track changes to files using the Changes tool](../changes/changes-tool.md)
Copy file name to clipboardExpand all lines: microsoft-edge/devtools-guide-chromium/speed/get-started.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ The source files for the website are at [MicrosoftEdge / Demos > travel-site](ht
49
49
50
50
First, set up the website locally, so that you can make changes to it later:
51
51
52
-
1. Get the website's source code locally: [Download or clone the Demos repo](../sample-code/sample-code.md#download-or-clone-the-demos-repo).
52
+
1. Get the website's source code locally: [Clone the Edge Demos repo to your drive](../sample-code/sample-code.md#clone-the-edge-demos-repo-to-your-drive) in _Sample code for DevTools_.
53
53
54
54
1. Open the folder you just downloaded or cloned in Visual Studio Code.
* [Open a demo folder in the Sources tool and edit a file](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-in-the-sources-tool-and-edit-a-file) in _Sample code for DevTools_.
502
+
* [Open a demo folder from the Workspace tab in the Sources tool](../../devtools-guide-chromium/sample-code/sample-code.md#open-a-demo-folder-from-the-workspace-tab-in-the-sources-tool)
503
503
* [Track changes to files using the Changes tool](../changes/changes-tool.md)
504
504
* [Display or edit source files using the Quick source tool](../quick-source/quick-source-tool.md)
*[Download or clone the Demos repo](../devtools-guide-chromium/sample-code/sample-code.md#download-or-clone-the-demos-repo) in _Sample code for DevTools_.
38
+
*[Clone the Edge Demos repo to your drive](../devtools-guide-chromium/sample-code/sample-code.md#clone-the-edge-demos-repo-to-your-drive) in _Sample code for DevTools_.
*[Download or clone the Demos repo](../devtools-guide-chromium/sample-code/sample-code.md#download-or-clone-the-demos-repo) in _Sample code for DevTools_.
146
+
*[Clone the Edge Demos repo to your drive](../devtools-guide-chromium/sample-code/sample-code.md#clone-the-edge-demos-repo-to-your-drive) in _Sample code for DevTools_.
Copy file name to clipboardExpand all lines: microsoft-edge/progressive-web-apps-chromium/how-to/sidebar.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -207,7 +207,7 @@ The source code for the PWAmp demo app has the following, to support the Microso
207
207
208
208
* The `isSidebarPWA` variable, which uses the `navigator.userAgentData` JavaScript API in the [app.js](https://github.com/MicrosoftEdge/Demos/blob/main/pwamp/app.js#L14) file.
209
209
210
-
You can find the entire PWAmp demo source code at [MicrosoftEdge / Demos > pwamp](https://github.com/MicrosoftEdge/Demos/tree/main/pwamp). To download the source code locally, see [Download or clone the Demos repo](../../devtools-guide-chromium/sample-code/sample-code.md#download-or-clone-the-demos-repo) in _Sample code for DevTools_.
210
+
You can find the entire PWAmp demo source code at [MicrosoftEdge / Demos > pwamp](https://github.com/MicrosoftEdge/Demos/tree/main/pwamp). To download the source code locally, see [Clone the Edge Demos repo to your drive](../sample-code/sample-code.md#clone-the-edge-demos-repo-to-your-drive) in _Sample code for DevTools_.
Copy file name to clipboardExpand all lines: microsoft-edge/webview2/how-to/machine-setup.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,7 +177,8 @@ If you instead want to clone the repo by using a Git Bash shell or command promp
177
177
178
178
See also:
179
179
*[Cloning a repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) - GitHub docs.
180
-
*[Downloading or cloning the Demos repo](../../devtools-guide-chromium/sample-code/sample-code.md#download-or-clone-the-demos-repo) in _Sample code for DevTools_.
180
+
*[Clone the Edge Demos repo to your drive](../../devtools-guide-chromium/sample-code/sample-code.md#clone-the-edge-demos-repo-to-your-drive) in _Sample code for DevTools_.
181
+
181
182
*[Step 6: Set up a localhost server](../../visual-studio-code/microsoft-edge-devtools-extension/install.md#step-6-set-up-a-localhost-server) in _Installing the DevTools extension for Visual Studio Code_.
182
183
183
184
@@ -307,5 +308,5 @@ To update the WebView2 Runtime on your development machine and on user machines,
307
308
## See also
308
309
309
310
*[Cloning a repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) - GitHub docs.
310
-
*[Downloading or cloning the Demos repo](../../devtools-guide-chromium/sample-code/sample-code.md#download-or-clone-the-demos-repo) in _Sample code for DevTools_.
311
+
*[Clone the Edge Demos repo to your drive](../../devtools-guide-chromium/sample-code/sample-code.md#clone-the-edge-demos-repo-to-your-drive) in _Sample code for DevTools_.
311
312
*[Step 6: Set up a localhost server](../../visual-studio-code/microsoft-edge-devtools-extension/install.md#step-6-set-up-a-localhost-server) in _Installing the DevTools extension for Visual Studio Code_.
0 commit comments