A surgical debugging tool to uncover the layers under your app.

Overview

Scalpel

DEPRECATED! Android Studio 4.0's layout inspector now includes a live-updating 3D view. Use it!


A surgical debugging tool to uncover the layers under your app.

Usage

Place a ScalpelFrameLayout at the root of your hierarchy.

  • Enable the 3D interaction with setLayerInteractionEnabled(boolean).
  • Toggle wireframe display with setDrawViews(boolean).
  • Toggle view ID display with setDrawIds(boolean).
  • Change the wireframe color with setChromeColor(int) and setChromeShadowColor(int).

When interaction is enabled the following gestures are supported:

  • Single touch: Controls the rotation of the model.
  • Two finger vertical pinch: Adjust zoom.
  • Two finger horizontal pinch: Adjust layer spacing.

If you are using the Gradle-based build system, you can wrap this view group around your activity layouts only in the debug builds.

Note: There are known text rendering issues prior to Android 4.4 that cannot be fixed. Sorry.

Download

Download the latest JAR or grab via Gradle:

compile 'com.jakewharton.scalpel:scalpel:1.1.2'

or Maven:

<dependency>
  <groupId>com.jakewharton.scalpel</groupId>
  <artifactId>scalpel</artifactId>
  <version>1.1.2</version>
</dependency>

License

Copyright 2014 Jake Wharton

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Comments
  • Request : make a desktop version

    Request : make a desktop version

    I think it will be much cooler to use on the PC (like the tool on DDMS) instead of the device itself.

    Please make it happen somehow. Maybe you could even add features that the DDMS tool doesn't have.

    opened by AndroidDeveloperLB 20
  • Sqaush view/level queue into one queue

    Sqaush view/level queue into one queue

    Saw the todo in in code and thought i would fix it. I changed the naming from 'level' to 'layer' mostly because i thought is made it clearer but if you don't think it's appropriate i will revert that. Otherwise nothing much to say, this shouldn't take noticeably more memory as the previous version was boxing the level into a Integer. However if memory / allocation time would ever become a problem is't easy to start caching the LayeredView objects.

    opened by emilsjolander 5
  • Added drawing class names and build updated

    Added drawing class names and build updated

    Added drawing class names functionality described in #21 and build configuration was updated for latest versions of used tools.

    Drawing class names

    When it is enabled, simple class name is rendered for view. When there is id as well, class name is rendered under it. screen

    Gradle build update

    Update Gradle configuration for newest Gradle distribution and Android Gradle plugin. Updated and tested new Travis configuration.

    opened by jraska 4
  • Added ScalpelFrameLayout#setDrawIds

    Added ScalpelFrameLayout#setDrawIds

    It is now possible to let ScalpelFrameLayout draw the view's ID. Also extended the SampleActivity to include a new MenuItem for toggling this feature.

    opened by ChristianKatzmann 3
  • Option to reverse lookup and display view IDs, class name

    Option to reverse lookup and display view IDs, class name

    Would be cool to see this data but it's already a space-constrained layout. How can we display this on-demand without just cramming it in. Long-press and drag to select which view you are interested in?

    opened by JakeWharton 2
  • Please, add javadoc and source code to the gradle artifact

    Please, add javadoc and source code to the gradle artifact

    Currently there is neither javadoc nor source code included. I now there used to be some problems shipping javadoc and source code in aar files, but they seem to have been fixed

    opened by netimen 1
  • DFS to pre-compute view layer levels and avoid collisions.

    DFS to pre-compute view layer levels and avoid collisions.

    This fixes #15 at the expense of switching to a view-hierarchy snapshot rather than being tired directly. For some reason, we were triggering re-layout constantly which thrashes objects in this tree.

    Not convinced this is ready to go in yet...

    opened by JakeWharton 0
  • Fix multitouch.

    Fix multitouch.

    No need to iterate through all pointers when we know only two of them matters. The sign of dy/dx for each pointer also changes based on where the other pointer is relative to it.

    opened by SimonVT 0
  • build error

    build error

    after I import the project and found this error:

    Error:Gradle DSL method not found: 'getBootClasspath()'
    

    It seem that the build.gradle config is too old, please update the build.gradle

    opened by ragnraok 2
  • Feature Request: setDrawClassNames

    Feature Request: setDrawClassNames

    In addition to drawing ids I would like to see the ability to toggle class names of the views.

    ex "android.widget.TextView" or even just "TextView".

    opened by ebabel 0
  • Translation not working

    Translation not working

    I've started using scalpel in my app, and I've been seing a bug (I guess) where setting translation values in views doesn't have any effect. I didn't know which was the cause, but I have now confirmed that is due to using ScalpelLayout (with the Debug Drawer from u2020, thanks a lot for that Jake).

    I don't have enough knowledge to debug the issue, so I'm reporting it. I hope it's fixable. Thanks anyways :)

    opened by Sloy 0
  • Siblings Occupying The Same Area Need Stacked

    Siblings Occupying The Same Area Need Stacked

    Currently siblings are always drawn on the same layer. This is actually bad if you have overlapping views as they and their children can draw over each other on the same level.

    A second child which overlaps need to be prompted to a layer higher than its sibling (and all its children).

    opened by JakeWharton 5
  • Animation API Transformation

    Animation API Transformation

    Use the animation APIs for performing the hierarchy transformation.

    Pros:

    • Hardware accelerated.
    • Could have a super-sexy enabled/disabled transition.
    • Views would still be interactive.
    • Doesn't require being in the view hierarchy (unless we want to intercept touch events)

    Cons:

    • Other animations using absolute positioning would break the effect.
    opened by JakeWharton 0
Owner
Jake Wharton
Jake Wharton
A model-agnostic visual debugging tool for machine learning

Manifold This project is stable and being incubated for long-term support. Manifold is a model-agnostic visual debugging tool for machine learning. Un

Uber Open Source 1.6k Dec 25, 2022
Under the Hood is a flexible and powerful Android debug view library. It uses a modular template system that can be easily extended to your needs, although coming with many useful elements built-in.

Under the Hood - Android App Debug View Library Under the Hood is a flexible and powerful Android debug view library. It uses a modular template syste

Patrick Favre-Bulle 217 Nov 25, 2022
Easier RxJava2 debugging with better stacktraces

Traceur Traceur enables easier debugging of RxJava2 exceptions, by appending the source of any asynchronous calls to the original exception. An exampl

Oisin O'Neill 493 Dec 18, 2022
traffic debugging library for android

TrafficMonitor About Display traffic per Activity.Observing traffic is used by TrafficStats API. OkHttp Interceptor observer is implementing. Demo Bai

Tetsuya Masuda 17 Feb 4, 2022
Pluto: An on-device debugging framework for Android applications

Pluto is an on-device debugging framework for Android applications, which helps in the inspection of HTTP requests/responses, captures Crashes, and ANRs, and manipulates application data on the go.

Pluto 550 Dec 27, 2022
btrace(AKA RheaTrace) is a high performance Android trace tool which is based on Systrace

btrace README 中文版 btrace(AKA RheaTrace) is a high performance Android trace tool

Bytedance Inc. 1.2k Jan 4, 2023
🌼APM, (Application Performance Management) tool for kotlin/java application.

??APM, (Application Performance Management) tool for kotlin/java application.

Espresso 4 Mar 8, 2022
This app will show grid overlay over whole system which helps you to verify your excellent app design.

GridWichterle for Android This app will show grid overlay over whole system which helps you to verify your excellent app design. Download: What is the

Inmite s.r.o. 407 Jan 9, 2023
Sources for the LiveBoot app for rooted Android devices

This is the sauce for the LiveBoot app. License Copyright © 2011-2020 Jorrit Chainfire Jongma This code is released under the GPLv3. LICENSE, COPYING.

Chainfire 131 Jan 9, 2023
Myapp - An app that simulates persistence of a student's list at runtime

Student List Uma aplicação android que implementa uma lista de estudantes, ou pe

Emerson Przybyloviecz 0 Jan 2, 2022
A surgical debugging tool to uncover the layers under your app.

Scalpel DEPRECATED! Android Studio 4.0's layout inspector now includes a live-updating 3D view. Use it! A surgical debugging tool to uncover the layer

Jake Wharton 2.8k Jan 3, 2023
🧬 Android DataBinding kit for notifying data changes from Model layers to UI layers on MVVM architecture.

?? Android DataBinding kit for notifying data changes from Model layers to UI layers on MVVM architecture.

Jaewoong Eum 276 Jan 5, 2023
🧬 Android DataBinding kit for notifying data changes from Model layers to UI layers on MVVM architecture.

?? Android DataBinding kit for notifying data changes from Model layers to UI layers on MVVM architecture.

Jaewoong Eum 275 Dec 21, 2022
A library for debugging android databases and shared preferences - Make Debugging Great Again

Android Debug Database Android Debug Database is a powerful library for debugging databases and shared preferences in Android applications Android Deb

AMIT SHEKHAR 8.1k Dec 29, 2022
A model-agnostic visual debugging tool for machine learning

Manifold This project is stable and being incubated for long-term support. Manifold is a model-agnostic visual debugging tool for machine learning. Un

Uber Open Source 1.6k Dec 25, 2022
Jetpack Compose-based chess app with visualisation layers.

Chesso Chesso is an animated, Jetpack Compose-based chess app aimed at beginners and intermediate players for studying purposes. Its distinctive key f

Zsolt Kocsi 83 Dec 30, 2022
This is an IDEA plugin that allows you to connect Android devices via WiFi for debugging your codes.

AdbWifiUtils Github | Issues | README | 中文文档 ● [Description]: This is an IDEA plugin that allows you to connect Android devices via WiFi for debugging

AWeiLoveAndroid 3 Sep 19, 2022
Under the Hood is a flexible and powerful Android debug view library. It uses a modular template system that can be easily extended to your needs, although coming with many useful elements built-in.

Under the Hood - Android App Debug View Library Under the Hood is a flexible and powerful Android debug view library. It uses a modular template syste

Patrick Favre-Bulle 217 Nov 25, 2022