Giter Club home page Giter Club logo

android-dev-ext's Introduction

Android for VS Code

This is a preview version of the Android for VS Code Extension. The extension allows developers to install, launch and debug Android Apps from within the VS Code environment.

Features

  • Line by line code stepping
  • Breakpoints
  • Variable inspection and modification
  • Logcat viewing [ Command Palette -> Android: View Logcat ]
  • Break on exceptions
  • Step through Android sources

Requirements

You must have Android SDK Platform Tools installed. This extension communicates with your device via the ADB (Android Debug Bridge) interface.

You are not required to have Android Studio installed - if you have Android Studio installed, make sure there are no active instances of it when using this extension or you may run into problems with ADB.

Limitations

  • This is a preview version so expect the unexpected. Please log any issues you find on GitHub.
  • This extension will not build your app.
    If you use gradle (or Android Studio), you can build your app from the command-line using ./gradlew assembleDebug.

You must use gradle or some other build procedure to create your APK. Once built, the extension can deploy and launch your app, allowing you to debug it in the normal way.

  • Some debugger options are yet to be implemented. You cannot set conditional breakpoints and watch expressions must be simple variables.
  • If you require a must-have feature that isn't there yet, let us know on GitHub.
  • This extension does not provide any additional code completion or other editing enhancements.

Extension Settings

This extension allows you to debug your App by creating a new Android configuration in launch.json.
The following settings are used to configure the debugger:

{
    "version": "0.2.0",
    "configurations": [
        {
            // configuration type, request  and name. "launch" is used to deploy the app to your device and start a debugging session
            "type": "android",
            "request": "launch",
            "name": "Launch App",

            // Location of the App source files. This value must point to the root of your App source tree (containing AndroidManifest.xml)
            "appSrcRoot": "${workspaceRoot}/app/src/main",

            // Fully qualified path to the built APK (Android Application Package)
            "apkFile": "${workspaceRoot}/app/build/outputs/apk/app-debug.apk",

            // Port number to connect to the local ADB (Android Debug Bridge) instance. Default: 5037
            "adbPort": 5037,

            // Launch behaviour if source files have been saved after the APK was built. One of: [ ignore warn stop ]. Default: warn
            "staleBuild": "warn",
        }
    ]
}

Questions / Problems

If you run into any problems, tell us on GitHub or contact me on Twitter.

Launch Android App

android-dev-ext's People

Contributors

adelphes avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.