Skip to content

Conversation

105th
Copy link
Member

@105th 105th commented May 27, 2025

No description provided.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the documentation for debugging rules in the AdGuard Browser Extension for Chrome MV3. It replaces Yarn with pnpm in various commands, adds instructions for using the @adguard/dnr-rulesets watch mode for faster rule development, and clarifies the renaming of the old beta MV2 extension.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
docs/adguard-browser-extension/solving-problems/debug-rules.md Replaced Yarn commands with pnpm and added detailed instructions to use the watch mode for DNR rulesets.
docs/adguard-browser-extension/mv3-version.md Updated the text regarding the renaming of the old beta extension.


![Reload extension](https://cdn.adtidy.org/content/Kb/ad_blocker/browser_extension/reload_extension.png)

1. If you see an ❗ mark - it means that assumed rule (which we calculated with our tsurlfilter engine, which performed applying rules in MV2) and actually applied rule (from which we converted to DNR rule) are not the same. And this can be a problem of conversion. <br/> Otherwise, if assumed and applied rules are the same - only applied rule, in raw text and declarative rule views, will be shown.
Copy link

Copilot AI May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider rephrasing the explanation regarding the ❗ mark for improved clarity; breaking it into shorter sentences might help readers better understand the conversion issue.

Copilot uses AI. Check for mistakes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. If you see an mark - it means that assumed rule (which we calculated with our tsurlfilter engine, which performed applying rules in MV2) and actually applied rule (from which we converted to DNR rule) are not the same. And this can be a problem of conversion. <br/> Otherwise, if assumed and applied rules are the same - only applied rule, in raw text and declarative rule views, will be shown.
1. If you see an exclamation mark, it means the assumed rule (calculated by our tsurlfilter engine using MV2 rules) and the applied rule (converted to a DNR rule) are different. This can be a problem of conversion.
Otherwise, if assumed and applied rules are the same, only applied rule, in raw text and declarative rule views, will be shown.


![Reload extension](https://cdn.adtidy.org/content/Kb/ad_blocker/browser_extension/reload_extension.png)

1. If you see an ❗ mark - it means that assumed rule (which we calculated with our tsurlfilter engine, which performed applying rules in MV2) and actually applied rule (from which we converted to DNR rule) are not the same. And this can be a problem of conversion. <br/> Otherwise, if assumed and applied rules are the same - only applied rule, in raw text and declarative rule views, will be shown.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The HTML entity <br/> at the end of the file should be replaced with the markdown equivalent (two spaces followed by a newline or an empty line) for better compatibility and readability across different markdown renderers.

Copy link

Preview was deployed to: https://pull-request-700.kb-adg.pages.dev/

The **beta version of MV3** will still be available in the [Chrome Web Store](https://chromewebstore.google.com/detail/adguard-adblocker-mv3-exp/apjcbfpjihpedihablmalmbbhjpklbdf).

The old beta extension will be renamed to [**AdGuard Ad Blocker MV2**](https://chromewebstore.google.com/detail/adguard-adblocker-beta/gfggjaccafhcbfogfkogggoepomehbjl) and will be supported until Google phases it out.
The old beta extension was renamed to [**AdGuard Ad Blocker MV2**](https://chromewebstore.google.com/detail/adguard-adblocker-beta/gfggjaccafhcbfogfkogggoepomehbjl) and will be supported until Google phases it out.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The old beta extension was renamed to [**AdGuard Ad Blocker MV2**](https://chromewebstore.google.com/detail/adguard-adblocker-beta/gfggjaccafhcbfogfkogggoepomehbjl) and will be supported until Google phases it out.
The old beta extension was renamed to [**AdGuard Ad Blocker MV2**](https://chromewebstore.google.com/detail/adguard-adblocker-beta/gfggjaccafhcbfogfkogggoepomehbjl) and may no longer be supported by Google.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The old beta extension was renamed to [**AdGuard Ad Blocker MV2**](https://chromewebstore.google.com/detail/adguard-adblocker-beta/gfggjaccafhcbfogfkogggoepomehbjl) and will be supported until Google phases it out.
The old beta extension has been renamed to [**AdGuard Ad Blocker MV2**](https://chromewebstore.google.com/detail/adguard-adblocker-beta/gfggjaccafhcbfogfkogggoepomehbjl) and may no longer be supported by Google.

The **beta version of MV3** will still be available in the [Chrome Web Store](https://chromewebstore.google.com/detail/adguard-adblocker-mv3-exp/apjcbfpjihpedihablmalmbbhjpklbdf).

The old beta extension will be renamed to [**AdGuard Ad Blocker MV2**](https://chromewebstore.google.com/detail/adguard-adblocker-beta/gfggjaccafhcbfogfkogggoepomehbjl) and will be supported until Google phases it out.
The old beta extension was renamed to [**AdGuard Ad Blocker MV2**](https://chromewebstore.google.com/detail/adguard-adblocker-beta/gfggjaccafhcbfogfkogggoepomehbjl) and will be supported until Google phases it out.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The old beta extension was renamed to [**AdGuard Ad Blocker MV2**](https://chromewebstore.google.com/detail/adguard-adblocker-beta/gfggjaccafhcbfogfkogggoepomehbjl) and will be supported until Google phases it out.
The old beta extension has been renamed to [**AdGuard Ad Blocker MV2**](https://chromewebstore.google.com/detail/adguard-adblocker-beta/gfggjaccafhcbfogfkogggoepomehbjl) and may no longer be supported by Google.

## How to debug rules

1. Find and modify the rule you need in the `./Extension/filters/chromium-mv3` directory in the `.txt` files.
For faster development of DNR rulesets, you can use `@adguard/dnr-rulesets` watch mode, which will automatically rebuild rulesets whenever filter files change:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For faster development of DNR rulesets, you can use `@adguard/dnr-rulesets` watch mode, which will automatically rebuild rulesets whenever filter files change:
To speed up the development of DNR rulesets, use the `@adguard/dnr-rulesets` watch mode. This mode automatically rebuilds rulesets whenever filter files change:

For faster development of DNR rulesets, you can use `@adguard/dnr-rulesets` watch mode, which will automatically rebuild rulesets whenever filter files change:

1. Convert the rules from txt to declarative form:
1. First, build the extension once (just skip, if you did it in the "How to build extension" section):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. First, build the extension once (just skip, if you did it in the "How to build extension" section):
1. First, build the extension (skip this step if you already did so in the *How to build extension* section):

./build/dev/chrome-mv3/filters/declarative
```

1. Now, whenever you modify filter files, the DNR rulesets will be automatically rebuilt without having to rebuild the entire extension.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Now, whenever you modify filter files, the DNR rulesets will be automatically rebuilt without having to rebuild the entire extension.
Now, whenever you modify filter files, the DNR rulesets will rebuild automatically, so you won’t have to rebuild the entire extension.


![Reload extension](https://cdn.adtidy.org/content/Kb/ad_blocker/browser_extension/reload_extension.png)

1. If you see an ❗ mark - it means that assumed rule (which we calculated with our tsurlfilter engine, which performed applying rules in MV2) and actually applied rule (from which we converted to DNR rule) are not the same. And this can be a problem of conversion. <br/> Otherwise, if assumed and applied rules are the same - only applied rule, in raw text and declarative rule views, will be shown.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. If you see an mark - it means that assumed rule (which we calculated with our tsurlfilter engine, which performed applying rules in MV2) and actually applied rule (from which we converted to DNR rule) are not the same. And this can be a problem of conversion. <br/> Otherwise, if assumed and applied rules are the same - only applied rule, in raw text and declarative rule views, will be shown.
1. If you see an exclamation mark, it means the assumed rule (calculated by our tsurlfilter engine using MV2 rules) and the applied rule (converted to a DNR rule) are different. This can be a problem of conversion.
Otherwise, if assumed and applied rules are the same, only applied rule, in raw text and declarative rule views, will be shown.

Copy link

Preview was deployed to: https://pull-request-700.kb-adg.pages.dev/

@105th 105th requested a review from el-termikael May 28, 2025 18:50
Copy link

Preview was deployed to: https://pull-request-700.kb-adg.pages.dev/

Copy link

Preview was deployed to: https://pull-request-700.kb-adg.pages.dev/

Copy link

github-actions bot commented Jun 4, 2025

Preview was deployed to: https://pull-request-700.kb-adg.pages.dev/

Dasha_Bugayova and others added 22 commits July 15, 2025 15:23
Copy link

Preview was deployed to: https://pull-request-700.kb-adg.pages.dev/

1 similar comment
Copy link

Preview was deployed to: https://pull-request-700.kb-adg.pages.dev/

Copy link

github-actions bot commented Aug 5, 2025

Preview was deployed to: https://pull-request-700.kb-adg.pages.dev/

@kurrx kurrx self-requested a review August 5, 2025 12:02
If you see an exclamation mark in the filtering log, it means the assumed rule (calculated by the engine) and the applied rule (converted to DNR) are different. Otherwise, only the applied rule (in DNR and text ways) will be shown.

![Reload extension](https://cdn.adtidy.org/content/Kb/ad_blocker/browser_extension/reload_extension.png)
##### <a name="dev-technical-info-about-debug-commands"></a> Technical information about commands
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@105th is this section needs to be added?

Copy link

github-actions bot commented Aug 6, 2025

Preview was deployed to: https://pull-request-700.kb-adg.pages.dev/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.