Skip to content

Commit e0172c2

Browse files
committed
inc Quick source rvw cmts, Sources > Workspace
1 parent 1b25e8a commit e0172c2

8 files changed

Lines changed: 125 additions & 126 deletions

File tree

microsoft-edge/devtools-guide-chromium/javascript/guides/mark-content-scripts-library-code.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ ms.date: 05/04/2021
2323
limitations under the License. -->
2424
# Add content scripts to the Ignore List
2525

26+
<!-- todo: define _content script_, like in
27+
* [Using the Content scripts tab for Microsoft Edge extensions](../../sources/index.md#using-the-content-scripts-tab-for-microsoft-edge-extensions) in _Sources tool overview_.
28+
* [Content scripts](https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts) in Chrome Extensions docs.
29+
-->
30+
2631
When you use the **Sources** tool to step through code, sometimes you pause on code that you don't recognize and don't want to step through, such as code for a Microsoft Edge extension that's installed.
2732

2833
To avoid pausing on extension code:
@@ -40,6 +45,7 @@ To avoid pausing on extension code:
4045
## See also
4146

4247
* [Step 4: Step through the code](../index.md#step-4-step-through-the-code) in _Get started debugging JavaScript_
48+
* [Content scripts](https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts) in Chrome Extensions docs.
4349

4450

4551
<!-- ====================================================================== -->
463 Bytes
Loading
87.7 KB
Loading
-16 KB
Loading

microsoft-edge/devtools-guide-chromium/quick-source/quick-source-tool.md

Lines changed: 54 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@ ms.date: 03/07/2025
1010
---
1111
# Display or edit source files using the Quick source tool
1212
<!-- https://developer.chrome.com/docs/devtools/quick-source -->
13-
<!-- first give the always-available GUI way, then keyboard shortcuts, then transient UI in instructions that aren't present when a file is open -->
13+
<!-- first give the always-available GUI way, then keyboard shortcuts
14+
don't doc the empty tool UI, which is transient and is designed for the Sources tool -->
1415

15-
Use the **Quick source** tool to display or edit source files at the same time as displaying a tool other than the **Sources** tool.
16+
Use the **Quick source** tool to display or edit source files at the same time as displaying a tool other than the **Sources** tool. The **Quick source** tool always displays the same files that are open in the **Sources** tool.
1617

1718
![The Quick source tool](./quick-source-tool-images/quick-source-tool.png)
1819

@@ -32,43 +33,35 @@ If you open or close a file in one tool, the file is opened or closed in the oth
3233
<!-- ====================================================================== -->
3334
## Open a file in the Quick source tool
3435

35-
To make a file appear in the **Quick source** tool, open a file in the **Sources** tool, as follows:
36+
<!-- todo: run & show localhost in addr bar instead of github.io? -->
37+
38+
To view source files while using a tool than the **Sources** tool in the **Activity Bar**, use the **Quick source** tool, as follows:
3639

3740
1. Open a webpage; for example, open [Demo To Do](https://microsoftedge.github.io/Demos/demo-to-do/) in a new window or page.
3841

3942
1. Right-click the webpage and then select **Inspect**.
4043

4144
DevTools opens.
4245

43-
1. If the **Quick View** toolbar isn't shown at the bottom of DevTools, press **Esc**.
44-
45-
1. In the **Quick View** toolbar at the bottom of DevTools, click the **More tools** button, and then select **Quick source**.
46-
47-
The **Quick source** tool opens in **Quick View**:
48-
49-
![The Quick source tool, containing an Open file link](./quick-source-tool-images/quick-source-open-file.png)
50-
51-
The **Quick source** tool might show instructions including an **Open file** link, or it might display a file. Instead of using that transient link, the following steps show how to use the **Page** tab in the **Sources** tool, to make a file appear in the **Quick source** tool.
52-
53-
**Open a file by using the Sources tool:**
54-
5546
1. In the **Activity Bar** at the top of DevTools, select the **Sources** (![The Sources tool icon](./quick-source-tool-images/sources-icon.png)) tool.
5647

57-
The **Quick View** pane is minimized at the bottom of DevTools.
58-
5948
1. In the **Sources** tool, in the **Page** tab, select one or more files, such as `to-do.js`.
6049

6150
The tabs for the selected files are opened in the **Sources** tool:
6251

6352
![The Sources tool > Page tab with a file selected](./quick-source-tool-images/sources-tool-page-tab-file-selected.png)
6453

65-
1. In the **Activity Bar** at the top of DevTools, select a tool other than **Sources**, such as **Elements**.
54+
1. In the **Activity Bar** at the top of DevTools, select a tool other than **Sources**, such as **Elements** (![Elements icon](./quick-source-tool-images/elements-tool-icon.png)).
6655

67-
The **Quick source** tool expands in **Quick View** at the bottom of DevTools, and has a tab for each open file:
56+
1. If the **Quick View** toolbar isn't shown at the bottom of DevTools, press **Esc**.
57+
58+
1. In the **Quick View** toolbar at the bottom of DevTools, click the **More tools** button, and then select **Quick source**.
6859

69-
![A file displayed in the Quick source tool.](./quick-source-tool-images/file-displayed-in-quick-source.png)<!-- 1st use -->
60+
The **Quick source** tool expands in **Quick View** at the bottom of DevTools, and displays the same files that are open in the **Sources** tool:
7061

71-
You can now view or edit the file in the **Quick source** tool, at the same time as displaying a different tool.
62+
![A file displayed in the Quick source tool](./quick-source-tool-images/file-displayed-in-quick-source.png)
63+
64+
You can now view or edit the file in the **Quick source** tool, at the same time as displaying a different tool in the main part of DevTools.
7265

7366
See also:
7467
* [Using the Page tab to explore resources that construct the current webpage](../sources/index.md#using-the-page-tab-to-explore-resources-that-construct-the-current-webpage) in _Sources tool overview_.
@@ -77,39 +70,17 @@ See also:
7770
<!-- ====================================================================== -->
7871
## Edit local source files in DevTools by selecting a Workspace folder
7972

80-
By selecting a local folder as a **Workspace**, you can edit files from within the **Quick source** tool at the same time as displaying a different tool (or from within the **Sources** tool), and have those edits be saved to your local drive. This way, when you edit a file in DevTools, the edits are not only made to the transient file that's returned by the server, but are also saved to the source file on your local drive.
73+
By selecting a local folder as a **Workspace** in the **Sources** tool, you can then edit files from within the **Quick source** tool at the same time as displaying a different tool, and have those edits be saved to your local drive. This way, you can edit files in the **Quick source** tool while using another tool, such as **Elements** or **Network**, and have your edits be saved to the corresponding source file on your local drive.
8174

82-
To open a server webpage file in the **Quick source** tool and save any edits to your local **Workspace** folder of source files:
75+
To edit source files in the **Quick source** tool:
8376

84-
1. Open the DevTools **Quick source** tool.
85-
1. Have local source files, such as a cloned repo.
86-
1. Select a local folder of source files as the Workspace.
77+
1. Have access to your source files locally, such as a cloned repo. See [Have local source files, such as a cloned repo](#have-local-source-files-such-as-a-cloned-repo), below.
78+
1. In the **Workspace** tab in the **Sources** tool, add a local folder of source files. See [Select a local folder of source files as the Workspace](#select-a-local-folder-of-source-files-as-the-workspace), below.
79+
1. In the **Activity Bar**, select a tool other than the **Sources** tool, such as the **Elements** tool. Then in the **Quick View** panel at the bottom of DevTools, open the **Quick source** tool. See [Open the Quick source tool](#open-the-quick-source-tool), below.
8780

8881
These steps are detailed below.
8982

9083

91-
<!-- ------------------------------ -->
92-
#### Open the DevTools Quick source tool
93-
94-
1. Open a webpage that's on a web server; for example, open [Demo To Do](https://microsoftedge.github.io/Demos/demo-to-do/) in a new window or page. That page is hosted on the web server `microsoftedge.github.io`.
95-
96-
1. Right-click the webpage and then select **Inspect**.
97-
98-
DevTools opens.
99-
100-
1. If the **Quick View** toolbar isn't shown at the bottom of DevTools, press **Esc**.
101-
102-
1. In the **Quick View** toolbar at the bottom of DevTools, click the **More tools** button, and then select **Quick source**.
103-
104-
The **Quick source** tool opens in **Quick View** at the bottom of DevTools:
105-
106-
![The Quick source tool, containing a Select folder link](./quick-source-tool-images/quick-source-select-folder.png)
107-
108-
The **Quick source** tool might show instructions including an **Select folder** link, or it might display a file. Instead of relying on that transient link, the steps further below show how to use the **Workspace** tab in the **Sources** tool, to select a local folder of source files.
109-
110-
Continue with the next section.
111-
112-
11384
<!-- ------------------------------ -->
11485
#### Have local source files, such as a cloned repo
11586

@@ -154,6 +125,8 @@ Continue with the next section.
154125
<!-- ------------------------------ -->
155126
#### Select a local folder of source files as the Workspace
156127

128+
<!-- todo: start localhost server -->
129+
157130
1. In the **Activity Bar** at the top of DevTools, select the **Sources** (![The Sources tool icon](./quick-source-tool-images/sources-icon.png)) tool, select the **Workspace** tab (grouped with the **Page** tab), and then in the **Workspace** tab, click the **Add folder** button.
158131

159132
The **Select Folder** dialog opens.
@@ -170,13 +143,32 @@ Continue with the next section.
170143

171144
The file opens in the **Sources** tool:
172145

173-
![The Sources tool with a file selected](./quick-source-tool-images/sources-tool-with-file-selected.png)
146+
![The Sources tool with a file selected](./quick-source-tool-images/sources-tool-with-file-selected.png)<!-- todo: localhost in addr bar -->
174147

175148
1. In the **Activity Bar** at the top of DevTools, select a tool other than the **Sources** tool, such as the **Elements** tool.
176149

177150
The **Quick source** tool expands in **Quick View** at the bottom of DevTools, and has a tab for each open file:
178151

179-
![A file displayed in the Quick source tool](./quick-source-tool-images/file-displayed-in-quick-source.png)<!-- 2nd use -->
152+
![A file displayed in the Quick source tool.](./quick-source-tool-images/file-displayed-in-quick-source-2.png)<!-- copied from above then appended -2 --><!-- todo: localhost in addr bar -->
153+
154+
Continue with the next section.
155+
156+
157+
<!-- ------------------------------ -->
158+
#### Open the Quick source tool
159+
160+
1. In the **Activity Bar**, select a tool other than the **Sources** tool, such as the **Elements** tool.
161+
162+
1. If the **Quick View** toolbar isn't shown at the bottom of DevTools, press **Esc**.
163+
164+
1. In the **Quick View** toolbar at the bottom of DevTools, click the **More tools** button, and then select **Quick source**.
165+
166+
The **Quick source** tool opens in **Quick View** at the bottom of DevTools:
167+
168+
![The Quick source tool, containing a Select folder link](./quick-source-tool-images/quick-source-select-folder.png)
169+
170+
The **Quick source** tool might show instructions including an **Select folder** link, or it might display a file. Instead of relying on that transient link, the steps further below show how to use the **Workspace** tab in the **Sources** tool, to select a local folder of source files.
171+
180172

181173
Now, when you edit the folder's files in DevTools, the edits are not only made to the transient file that's returned by the server, but are also saved to the source files on your local drive. You can edit the file from within the **Quick source** tool at the same time as displaying another tool (or from within the **Sources** tool).
182174

@@ -189,7 +181,16 @@ See also:
189181
<!-- ====================================================================== -->
190182
## Open a file by using the Command Menu
191183

192-
Opening a file in the **Quick source** tool or **Sources** tool opens the file in both tools.
184+
Opening a file by using the **Command Menu** opens that file in both the **Quick source** tool and **Sources** tool.
185+
186+
187+
To open the **Command Menu**, do any of the following:
188+
189+
* Select **Customize and control DevTools** > **Run command**.
190+
191+
* Press **Ctrl+Shift+P** (Windows, Linux) or **Command+Shift+P** (macOS).
192+
193+
* Click the **Run command** link in the empty **Quick source** tool (or **Sources** tool).
193194

194195

195196
To open a file by using the **Open File** prompt of the **Command Menu**, do any of the following:
@@ -209,38 +210,14 @@ To open a file by using the **Open File** prompt of the **Command Menu**, do any
209210
To display the **Open file** link in the instructions in the panel, you might need to scroll down, or drag the **Quick View** divider up to make the **Quick View** panel taller.
210211

211212

212-
<!-- ------------------------------ -->
213-
#### Close a file
213+
<!-- ====================================================================== -->
214+
## Close a file
214215

215216
To close a file, click the **x** button in the file's tab.
216217

217218
The file is closed in the **Quick source** tool and **Sources** tool.
218219

219220

220-
<!-- ------------------------------ -->
221-
#### Select a Workspace folder
222-
223-
To save your DevTools edits to the source files on your local drive, do any of the following:
224-
225-
* In the **Sources** tool, in the **Workspace** tab, click the **Add folder** button.
226-
227-
* Click the **Select folder** link in the instructions, if no file is displayed in the **Quick source** tool.
228-
229-
* Drag a folder that contains your source files onto the **Sources** tool, when no file is open in the tool.
230-
231-
232-
<!-- ------------------------------ -->
233-
#### Open the Command Menu
234-
235-
To open the **Command Menu**, do any of the following:
236-
237-
* Select **Customize and control DevTools** > **Run command**.
238-
239-
* Press **Ctrl+Shift+P** (Windows, Linux) or **Command+Shift+P** (macOS).
240-
241-
* Click the **Run command** link in the empty **Quick source** tool (or **Sources** tool).
242-
243-
244221
<!-- ====================================================================== -->
245222
## See also
246223

0 commit comments

Comments
 (0)