{"id":17274323,"url":"https://github.com/xetera/undebugged-firefox","last_synced_at":"2025-04-12T19:11:46.074Z","repository":{"id":113235184,"uuid":"425602143","full_name":"Xetera/undebugged-firefox","owner":"Xetera","description":"🐛 A Firefox patch that disables debugger traps used by JavaScript obfuscators","archived":false,"fork":false,"pushed_at":"2021-11-07T20:40:29.000Z","size":2,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-26T13:29:47.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Xetera.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-07T19:55:42.000Z","updated_at":"2022-12-14T07:23:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"860cb9fa-f632-4e1e-a77f-b190f7abf7b4","html_url":"https://github.com/Xetera/undebugged-firefox","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xetera%2Fundebugged-firefox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xetera%2Fundebugged-firefox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xetera%2Fundebugged-firefox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xetera%2Fundebugged-firefox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xetera","download_url":"https://codeload.github.com/Xetera/undebugged-firefox/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618281,"owners_count":21134201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T08:53:39.130Z","updated_at":"2025-04-12T19:11:46.053Z","avatar_url":"https://github.com/Xetera.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Un-debugged Firefox\n\nObfuscated JavaScript files often use a technique called debugger traps to prevent you from reverse engineering the behavior of a script by calling\n\n```js\nwhile (true) {\n  debugger;\n}\n```\n\nwhen they detect devtools opening. This is trivial to get around by simply disabling breakpoints in your code, but with that approach you don't get to use actual breakpoints which makes life difficult.\n\n---\n\nThis patch makes `debugger;` behave like `break;` so infinite loops are instantly broken out of.\n\nIn order to use the actual `debugger;` statement, you can either use browser breakpoints, or the keyword `xdebugger;`\n\n## Usage\n\nThis patch requires you to build firefox from scratch which is going to be pretty slow.\n\nFollow through with the build tutorial here https://firefox-source-docs.mozilla.org/setup/linux_build.html\n\nOnce you've gone through the steps required to cloned the repo from mercurial, copy the patch file to the repository root and run\n\n`hg import debugger.patch --no-commit`\n\nand compile firefox using `./mach compile` at the repository root.\n\n## Limitations\n\nThis can cause problems when debugger is called with `eval(\"debugger\")` since eval statements are evaluated in a separate context outside of loops. For some reason this doesn't break anything for me when testing with code generated through obfuscate.io, so I'm not sure how much of a limitation this actually is.\n\nIf `break` is causing issues for your use case, you can try mapping `debugger;` to `null;` instead by replacing\n\n```cpp\nreturn breakStatement(yieldHandling);\n```\n\nwith\n\n```cpp\nreturn handler_.newNullLiteral(pos());\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxetera%2Fundebugged-firefox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxetera%2Fundebugged-firefox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxetera%2Fundebugged-firefox/lists"}