Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- To enable the crash reporter on local builds:
- export MOZ_CRASHREPORTER=1 and re-run mach config to pick up the change
- adb logcat -s "GeckoMemoryMonitor"
- adb shell am broadcast -a org.mozilla.gecko.FORCE_MEMORY_PRESSURE
- Busy sleep in JS:
- log("sleeping 20 s");
- this._sleep(20000);
- log("returned from sleep");
- _sleep: function sleepFor(sleepDuration) {
- var now = new Date().getTime();
- while(new Date().getTime() < now + sleepDuration){ /* do nothing */ }
- }
- Fuzzy hg import
- hg import --config ui.patch="patch --merge" fuzzy.patch
- GDB:
- Ctrl + C = break
- continue / c
- step / s = single step
- next / = step over
- break <file:line or functionname> = set breakpoint
- bt = backtrace calling stack
- print <variable name>
- ./gradlew clean app:assembleLocalAustralisDebug
- ./mach gradle clean app:assembleLocalAustralisDebug
- ./mach build && ./mach package && ./mach gradle clean app:assembleLocalAustralisDebug
- ./mach gradle clean app:assembleOfficialAustralisDebug && ./mach gradle app:assembleOfficialAustralisDebugAndroidTest
- Strg + Alt + Shift + I: bring up inspections in Android Studio (e.g. unused resources)
- HG alias for empty commit
- [alias] empty = !touch tmp ; $HG add tmp ; $HG commit tmp -m "<enter commit message>" ; $HG rm tmp ; $HG commit tmp --amend "$@"
- on Windows:
- empty = !touch tmp && hg add tmp && hg commit tmp -m "<enter commit message>" && hg rm tmp && hg commit tmp --amend "$@"
- Redirect output for faster builds
- ./mach build > build.log 2>&1
- Update rust:
- rustup update
- Screenshot via adb:
- adb shell screencap -p | sed 's/\r$//' > screen.png
- adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > screen.png
- adb exec-out screencap -p > screen.png
- android.os.Debug.waitForDebugger();
- Enable Desktop remote debugging:
- Shift + F2 for developer console, then "listen <port>"
- devtools.debugger.new-debugger-frontend
- GeckoConsole|GeckoSession|GeckoBrowser:
- root shell:
- sudo -s
- Reclaim empty virtual disk space:
- e4defrag /dev/sda1
- dd if=/dev/zero of=wipefile bs=1024x1024; rm wipefile
- Compact disk in VMWare
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement