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
## Tools that support cloning a repo and git commit/pull/push operations
161
-
162
-
Cloning a repo enables updating your local copy when the repo is updated. Many tools support cloning and syncing with a GitHub repo, such as:
163
-
164
-
* git commands at a command prompt such as the "git bash" shell. This is the main way that's documented here.
165
-
166
-
* GitHub Desktop. Integrates well with GitHub repos and pull requests, and with VS Code.
167
-
168
-
* Visual Studio Code. In the Activity Bar on the left, click **Source Control**.
169
-
170
-
* Visual Studio > **Git Changes** tab next to the **Solution Explorer** tab in the lower right.
171
-
172
-
* The "dot key" version of VS Code within the Edge browser. At Github.com, when viewing a branch or a pull request (PR), press the period (**.**) key. In the Activity Bar on the left, click:
*[Clone the WebView2Samples repo](../../webview2/how-to/machine-setup.md#clone-the-webview2samples-repo) in _Set up your Dev environment for WebView2_.
241
222
242
223
224
+
<!-- ------------------------------ -->
225
+
#### Tools that support cloning a repo and git commit/pull/push operations
226
+
227
+
Cloning a repo enables updating your local copy when the repo is updated. Many tools support cloning and syncing with a GitHub repo, such as:
228
+
229
+
* git commands at a command prompt such as the "git bash" shell. This is the main way that's documented here.
230
+
231
+
* GitHub Desktop. Integrates well with GitHub repos and pull requests, and with VS Code.
232
+
233
+
* Visual Studio Code. In the Activity Bar on the left, click **Source Control**.
234
+
235
+
* Visual Studio > **Git Changes** tab next to the **Solution Explorer** tab in the lower right.
236
+
237
+
* The "dot key" version of VS Code within the Edge browser. At Github.com, when viewing a branch or a pull request (PR), press the period (**.**) key. In the Activity Bar on the left, click:
Copy file name to clipboardExpand all lines: microsoft-edge/devtools-guide-chromium/sources/index.md
+25-49Lines changed: 25 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,31 +28,7 @@ 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
-
34
-
*[The Navigator, Editor, and Debugger panes](#the-navigator-editor-and-debugger-panes)
35
-
*[Using the Navigator pane to select files](#using-the-navigator-pane-to-select-files)
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)
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)
38
-
*[Using the Overrides tab to override server files with local files](#using-the-overrides-tab-to-override-server-files-with-local-files)
39
-
*[Using the Content scripts tab for Microsoft Edge extensions](#using-the-content-scripts-tab-for-microsoft-edge-extensions)
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)
41
-
*[Using the Command Menu to open files](#using-the-command-menu-to-open-files)
42
-
*[Using the Editor pane to view or edit files](#using-the-editor-pane-to-view-or-edit-files)
43
-
*[Editing a JavaScript file](#editing-a-javascript-file)
44
-
*[Reformatting a minified JavaScript file with pretty-print](#reformatting-a-minified-javascript-file-with-pretty-print)
45
-
*[Mapping minified code to your source code to show readable code](#mapping-minified-code-to-your-source-code-to-show-readable-code)
46
-
*[Transformations from source code to compiled front-end code](#transformations-from-source-code-to-compiled-front-end-code)
47
-
*[Editing a CSS file](#editing-a-css-file)
48
-
*[Editing an HTML file](#editing-an-html-file)
49
-
*[Going to a line number or function](#going-to-a-line-number-or-function)
50
-
*[Quick source tool, to display source files when using a different tool](#quick-source-tool-to-display-source-files-when-using-a-different-tool)
51
-
*[Using the Debugger pane to debug JavaScript code](#using-the-debugger-pane-to-debug-javascript-code)
52
-
*[The basic approach to using a debugger](#the-basic-approach-to-using-a-debugger)
53
-
*[Advantages of the debugger's Watch and Scope over console.log](#advantages-of-the-debuggers-watch-and-scope-over-consolelog)
54
-
*[Debug from Visual Studio Code directly](#debug-from-visual-studio-code-directly)
55
-
*[Articles about debugging](#articles-about-debugging)
31
+
todo: update
56
32
57
33
<!-- omit h4s
58
34
* [Icons in the Page tab](#icons-in-the-page-tab)
@@ -172,12 +148,13 @@ To change how resources are grouped:
172
148
173
149
Use the **Workspace** tab in the **Sources** tool to view and edit local files in DevTools. The **Workspace** tab is useful when used in conjunction with a local web server as you can then load your local website in Edge, and edit its source files in DevTools.
174
150
175
-
When you add a folder to the **Workspace** tab, that files and subfolders in that folder are displayed in the tab, and you can open files to view and edit them.
151
+
When you add a folder to the **Workspace** tab, the files and subfolders in that folder are displayed in the tab, and you can open files to view and edit them.
176
152
177
153
The **Workspace** tab does not show the resources that the browser downloaded to display the webpage; the **Workspace** tab only shows the folders and files that are inside the local folders that you added.
178
154
179
-
<!-- do green dots appear? maybe un-comment -->
180
-
<!-- A file that's in a Workspace is indicated by a green dot next to the file name, throughout DevTools. -->
155
+
Throughout DevTools, a green "mapped" dot appears on a file for which DevTools was able to find a mapping between the workspace file and the webpage resource. For example, if the page uses a stylesheet called `styles.css` and the workspace has a file called `styles.css`, DevTools maps the files to each other and displays a green "mapped" dot.
156
+
157
+
The green "mapped" dot indicates that changes you make to webpage resources will be saved. For example, when you make a change inside the **Styles** tab of the **Elements** tool, you're editing the webpage stylesheet (not the file). If the CSS file name that's shown in the **Styles** tab has a green "mapped" dot, that stylesheet has been mapped to a file in your workspace, and your changes won't be lost.
181
158
182
159

183
160
<!-- updating png:
@@ -212,7 +189,7 @@ See also:
212
189
213
190
Use the **Overrides** tab in the **Sources** tool to override any response from a webserver with local files. The **Overrides** tab is useful to make temporary changes to individual files, such as a CSS file, on any website. Use **Overrides** when you want to experiment with changes to a webpage, and you need to keep the changes after you refresh the webpage, but you don't care about mapping your changes to the source code of the webpage.
214
191
215
-
To start using the **Overrides** tab, create a new folder on your file system, and then select that folder in the **Overrides** tab. From then on, any changes that you make in the **Styles** tab of the **Elements** tool, or in the **Page** tab of the **Sources** tool, are saved in the new folder. DevTools uses the local files to override the server responses to<!-- todo: to? --> the matching resources.
192
+
To start using the **Overrides** tab, create a new folder on your file system, and then select that folder in the **Overrides** tab. From then on, any changes that you make in the **Styles** tab of the **Elements** tool, or in the **Page** tab of the **Sources** tool, are saved in the new folder. DevTools uses the local files to override the matching server responses.
216
193
217
194

218
195
@@ -435,13 +412,26 @@ In this scenario, the **Sources** tool is useful for inspecting and stepping-thr
435
412
436
413
437
414
<!-- ------------------------------ -->
438
-
#### Editing a CSS file
415
+
#### Editing CSS
416
+
417
+
There are two places to edit CSS rules and their properties in DevTools:
418
+
419
+
* In the **Styles** tab in the **Elements** tool, edit CSS properties through user interface controls.
439
420
440
-
There are two ways to edit CSS in DevTools:
441
-
* In the **Elements** tool, you work with one CSS property at a time, through user interface controls. This approach is recommended in most cases. For more information, see [Get started viewing and changing CSS](../css/index.md). Do not edit CSS in the **Elements** tool when using a **Workspace**; see [Editing a CSS file when using a Workspace](#editing-a-css-file-when-using-a-workspace), below.
442
-
* In the **Sources** tool, you use a text editor to edit CSS files.
421
+
* In the **Page** tab or **Workspace** tab in the **Sources** tool, use the text editor to edit a CSS file.
443
422
444
-
The **Sources** tool supports directly editing a CSS file. For example, if you edit the CSS file from the tutorial [Edit and save files in a workspace](../workspaces/index.md) to match the style rule below, the `H1` element in the upper left of the rendered webpage changes to green:
423
+
424
+
<!-- ---------- -->
425
+
###### Editing CSS by using the Styles tab in the Elements tool, when using the Workspace tab of the Sources tool
426
+
427
+
See also:
428
+
*[Limitations of the workspace feature with transformed source code](../workspaces/index.md#limitations-of-the-workspace-feature-with-transformed-source-code)
429
+
430
+
431
+
<!-- ---------- -->
432
+
###### The Page tab or Workspace tab in the Sources tool
433
+
434
+
The **Page** or **Workspace** tab in the **Sources** tool supports directly editing a CSS file. For example, if you edit the CSS file from the tutorial [Edit and save files in a workspace](../workspaces/index.md) to match the style rule below, the `H1` element in the upper left of the rendered webpage changes to green:
445
435
446
436
```css
447
437
h1 {
@@ -454,26 +444,12 @@ h1 {
454
444
CSS changes take effect immediately; you don't need to manually save the changes.
455
445
456
446
See also:
447
+
*[Get started viewing and changing CSS](../css/index.md).
457
448
*[Edit CSS font styles and settings in the Styles pane](../inspect-styles/edit-fonts.md)
458
449
*[Sources tool keyboard shortcuts](../shortcuts/index.md#sources-tool-keyboard-shortcuts) in _Keyboard shortcuts_
459
450
*[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)
460
451
461
452
462
-
<!-- ---------- -->
463
-
###### Editing a CSS file when using a Workspace
464
-
465
-
Do not use the **Elements** tool to edit CSS files when you are using the **Workspace** feature.
466
-
467
-
If you are using a **Workspace**, edit the CSS in the **Sources** tool (not in the **Elements** tool), because the source files that you edit might be built or compiled by a build script before being served by your local server.
468
-
When you edit in the **Elements** tool, you might be editing the compiled-and-built version of the file, not the source file.
469
-
470
-
When you use a **Workspace**:
471
-
1. Edit the file in the **Sources** tool.
472
-
1. Save the change.
473
-
1. Build again. Some build systems do this automatically, when they detect a change.
474
-
1. Reload the page. Some servers do this automatically when they detect a change.
Copy file name to clipboardExpand all lines: microsoft-edge/devtools-guide-chromium/workspaces/index.md
+28-3Lines changed: 28 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,7 +53,7 @@ Here's a typical scenario for using a workspace:
53
53
54
54
Your website might use a build system which you need to run before you can see the changes. Web developers often use a build system that watches for saved changes in the source code files. When you save a change to a source code file, the build system builds those changes and then automatically refreshes the page in the browser.
55
55
56
-
If you use such an automated build system, when you make a change to a source file in the **Sources** tool and save it, you automatically immediately see those changes applied to the rendered web page.
56
+
If you use such an automated build system, when you make a change to a source file in the **Sources** tool and save it, you automatically see those changes applied to the rendered web page.
57
57
58
58
The tutorial steps below walk you through this environment setup.
59
59
@@ -65,7 +65,32 @@ The tutorial steps below walk you through this environment setup.
65
65
If you're using a modern framework, it might transform your source code from a format that's easy to maintain into a format that's optimized to run as quickly as possible. The **Workspace** tab in the **Sources** tool is usually able to map the optimized code back to the original source code, by using [source maps](https://blog.teamtreehouse.com/introduction-source-maps) for JavaScript and CSS. However, there's a lot of variation in how each framework uses source maps.
66
66
67
67
DevTools doesn't support every framework variation. If you run into issues while using workspaces with your framework of choice, or you identify framework-specific steps that are needed, please reach out to use by opening an issue on the [MicrosoftEdge/DevTools](https://github.com/MicrosoftEdge/DevTools/issues) repository.
68
-
68
+
69
+
70
+
<!-- ---------- -->
71
+
###### Editing CSS by using the Styles tab in the Elements tool, when using the Workspace tab of the Sources tool
72
+
<!-- todo: condense and integrate -->
73
+
74
+
If you use a workspace, in some cases you can edit CSS in the **Styles** tab in the **Elements** tool and have the changes saved to the mapped file on disk:
75
+
76
+
* Edits that you make in the **Styles** tab in the **Elements** tool _are_ saved to the CSS file on disk, if DevTools has mapped a style sheet on the webpage and the file in the workspace, such as by a source map, or by matching content.
77
+
78
+
If you use an automatic build system framework, changes are saved to your source file if DEvTools was able to map the style sheet to the workspace file, by using a source map.
79
+
80
+
Depending on the automated build system or framework that you use, DevTools may be able to save changes to disk, if there's no build step, or there's a build step and a source map. The **Styles** tab is mapped to the CSS file on disk, and so edits in the **Styles** tab are saved to disk.
81
+
82
+
* Edits that you make in the **Styles** tab in the **Elements** tool are _not_ saved to the CSS file on disk, if the stylesheet isn't mapped to a workspace file. Editing CSS in the **Styles** tab of the **Elements** tool will lose changes; the changes aren't saved to disk.
83
+
84
+
85
+
If you are using a **Workspace**, edit the CSS in the **Sources** tool (not in the **Elements** tool), because the source files that you edit might be built or compiled by a build script before being served by your local server.
86
+
When you edit in the **Elements** tool, you might be editing the compiled-and-built version of the file, not the source file.
87
+
88
+
When you use a **Workspace**:
89
+
1. Edit the file in the **Sources** tool.
90
+
1. Save the change.
91
+
1. Build again. Some build systems do this automatically, when they detect a change.
92
+
1. Reload the page. Some servers do this automatically when they detect a change.
Copy file name to clipboardExpand all lines: microsoft-edge/web-platform/ad-selection-api.md
+20Lines changed: 20 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,26 @@ ms.date: 10/10/2024
12
12
13
13
The Ad Selection API provides user-relevant ads on your site without using third-party cookies. See [Ad Selection Overview](https://github.com/WICG/privacy-preserving-ads/blob/main/Ad%20Selection%20Overview.md) in the `privacy-preserving-ads` repo.
14
14
15
+
**Detailed contents:**
16
+
17
+
*[Attestation enrollment and alpha sign-up](#attestation-enrollment-and-alpha-sign-up)
18
+
*[When and where is the preview available?](#when-and-where-is-the-preview-available)
19
+
*[Flags for testing](#flags-for-testing)
20
+
*[Sign-up and attestation requirements and process](#sign-up-and-attestation-requirements-and-process)
21
+
*[Example JSON file](#example-json-file)
22
+
*[Important fields and values](#important-fields-and-values)
23
+
*[Deploy the Ad Selection API services](#deploy-the-ad-selection-api-services)
24
+
*[Images for deploying services](#images-for-deploying-services)
0 commit comments