Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tip #337

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions content/docs/develop/userscripts/debugging-userscripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ The `debugger;` keyword in JavaScript will freeze the page when ran, if the deve

Enter the addon ID on the "filter" console search bar to only view logs and warnings, as well errors logged with `console.error()`. Keep in mind that this will hide all exceptions, unless you're explicitly logging them in your code.

### Get VSCode Autocomplete on Addon API
GrahamSH-LLK marked this conversation as resolved.
Show resolved Hide resolved
Add this snippet before `export async function` to get full autocomplete on the addon object.
```js
/** @typedef {import("../../addon-api/content-script/typedef.js").UserscriptUtilities} UserscriptUtilities @param {UserscriptUtilities} */
```

## Edge cases

Expand Down