{ "name": "android-dev-ext", "displayName": "Android", "description": "Android debugging support for VS Code", "version": "1.2.0", "publisher": "adelphes", "preview": true, "license": "MIT", "engines": { "vscode": "^1.24.0" }, "categories": [ "Debuggers" ], "icon": "images/ade.png", "galleryBanner": { "color": "#5c2d91", "theme": "dark" }, "activationEvents": [ "onCommand:android-dev-ext.view_logcat", "onCommand:PickAndroidDevice", "onCommand:PickAndroidProcess", "onLanguage:java" ], "repository": { "type": "git", "url": "https://github.com/adelphes/android-dev-ext" }, "main": "./extension", "contributes": { "configuration": { "type": "object", "title": "Android", "properties": { "android-dev-ext.languageSupport": { "scope": "resource", "type": "boolean", "default": "true", "description": "Enable Java language support for Android" }, "android-dev-ext.appSourceRoot": { "scope": "resource", "type": "string", "default": "app/src/main", "description": "Workspace-relative path to the app source files. The specified folder should contain AndroidManifest.xml.\r\nChanges to this field require the extension or workspace to be reloaded." }, "android-dev-ext.codeCompletionLibraries": { "scope": "resource", "type": "array", "description": "Select which Android Jetpack Libraries (androidx.*) to include in code-completion results.\nNote: Switch to the JSON Settings editor for simpler editing of this list.", "examples": [ [ "androidx.activity:activity" ] ], "items": { "type": "string", "enum": [ "androidx.activity:activity", "androidx.annotation:annotation", "androidx.annotation:annotation-experimental", "androidx.annotation:annotation-experimental-lint", "androidx.appcompat:appcompat", "androidx.appcompat:appcompat-resources", "androidx.arch.core:core-common", "androidx.arch.core:core-runtime", "androidx.arch.core:core-testing", "androidx.asynclayoutinflater:asynclayoutinflater", "androidx.autofill:autofill", "androidx.benchmark:benchmark-common", "androidx.benchmark:benchmark-gradle-plugin", "androidx.benchmark:benchmark-junit4", "androidx.biometric:biometric", "androidx.browser:browser", "androidx.cardview:cardview", "androidx.collection:collection", "androidx.concurrent:concurrent-futures", "androidx.constraintlayout:constraintlayout", "androidx.constraintlayout:constraintlayout-solver", "androidx.contentpager:contentpager", "androidx.coordinatorlayout:coordinatorlayout", "androidx.core:core", "androidx.cursoradapter:cursoradapter", "androidx.customview:customview", "androidx.databinding:databinding-adapters", "androidx.databinding:databinding-common", "androidx.databinding:databinding-compiler", "androidx.databinding:databinding-compiler-common", "androidx.databinding:databinding-runtime", "androidx.databinding:viewbinding", "androidx.documentfile:documentfile", "androidx.drawerlayout:drawerlayout", "androidx.dynamicanimation:dynamicanimation", "androidx.emoji:emoji", "androidx.emoji:emoji-appcompat", "androidx.emoji:emoji-bundled", "androidx.enterprise:enterprise-feedback", "androidx.enterprise:enterprise-feedback-testing", "androidx.exifinterface:exifinterface", "androidx.fragment:fragment", "androidx.fragment:fragment-testing", "androidx.gridlayout:gridlayout", "androidx.heifwriter:heifwriter", "androidx.interpolator:interpolator", "androidx.leanback:leanback", "androidx.leanback:leanback-preference", "androidx.legacy:legacy-preference-v14", "androidx.legacy:legacy-support-core-ui", "androidx.legacy:legacy-support-core-utils", "androidx.legacy:legacy-support-v13", "androidx.legacy:legacy-support-v4", "androidx.lifecycle:lifecycle-common", "androidx.lifecycle:lifecycle-common-java8", "androidx.lifecycle:lifecycle-compiler", "androidx.lifecycle:lifecycle-extensions", "androidx.lifecycle:lifecycle-livedata", "androidx.lifecycle:lifecycle-livedata-core", "androidx.lifecycle:lifecycle-process", "androidx.lifecycle:lifecycle-reactivestreams", "androidx.lifecycle:lifecycle-runtime", "androidx.lifecycle:lifecycle-service", "androidx.lifecycle:lifecycle-viewmodel", "androidx.lifecycle:lifecycle-viewmodel-savedstate", "androidx.loader:loader", "androidx.localbroadcastmanager:localbroadcastmanager", "androidx.media2:media2-common", "androidx.media2:media2-exoplayer", "androidx.media2:media2-player", "androidx.media2:media2-session", "androidx.media2:media2-widget", "androidx.media:media", "androidx.mediarouter:mediarouter", "androidx.multidex:multidex", "androidx.multidex:multidex-instrumentation", "androidx.navigation:navigation-common", "androidx.navigation:navigation-dynamic-features-fragment", "androidx.navigation:navigation-dynamic-features-runtime", "androidx.navigation:navigation-fragment", "androidx.navigation:navigation-runtime", "androidx.navigation:navigation-safe-args-generator", "androidx.navigation:navigation-safe-args-gradle-plugin", "androidx.navigation:navigation-testing", "androidx.navigation:navigation-ui", "androidx.paging:paging-common", "androidx.paging:paging-runtime", "androidx.paging:paging-rxjava2", "androidx.palette:palette", "androidx.percentlayout:percentlayout", "androidx.preference:preference", "androidx.print:print", "androidx.recommendation:recommendation", "androidx.recyclerview:recyclerview", "androidx.recyclerview:recyclerview-selection", "androidx.room:room-common", "androidx.room:room-compiler", "androidx.room:room-guava", "androidx.room:room-migration", "androidx.room:room-runtime", "androidx.room:room-rxjava2", "androidx.room:room-testing", "androidx.savedstate:savedstate", "androidx.sharetarget:sharetarget", "androidx.slice:slice-builders", "androidx.slice:slice-core", "androidx.slice:slice-view", "androidx.slidingpanelayout:slidingpanelayout", "androidx.sqlite:sqlite", "androidx.sqlite:sqlite-framework", "androidx.swiperefreshlayout:swiperefreshlayout", "androidx.test:core", "androidx.test.espresso:espresso-accessibility", "androidx.test.espresso:espresso-contrib", "androidx.test.espresso:espresso-core", "androidx.test.espresso:espresso-idling-resource", "androidx.test.espresso:espresso-intents", "androidx.test.espresso:espresso-remote", "androidx.test.espresso:espresso-web", "androidx.test.espresso.idling:idling-concurrent", "androidx.test.espresso.idling:idling-net", "androidx.test.ext:junit", "androidx.test.ext:truth", "androidx.test.janktesthelper:janktesthelper", "androidx.test:monitor", "androidx.test:rules", "androidx.test:runner", "androidx.test.uiautomator:uiautomator", "androidx.transition:transition", "androidx.tvprovider:tvprovider", "androidx.vectordrawable:vectordrawable", "androidx.vectordrawable:vectordrawable-animated", "androidx.versionedparcelable:versionedparcelable", "androidx.viewpager2:viewpager2", "androidx.viewpager:viewpager", "androidx.wear:wear", "androidx.webkit:webkit", "androidx.work:work-gcm", "androidx.work:work-runtime", "androidx.work:work-rxjava2", "androidx.work:work-testing" ] } }, "android-dev-ext.subscriptionKey": { "scope": "application", "type": "string", "default": "" }, "android-dev-ext.trace": { "scope": "resource", "type": "boolean", "default": false, "description": "Enable diagnostic trace logging in the extension output." } } }, "commands": [ { "command": "android-dev-ext.view_logcat", "title": "Android: View Logcat" } ], "breakpoints": [ { "language": "java" }, { "language": "kotlin" } ], "debuggers": [ { "type": "android", "label": "Android", "program": "./src/debugMain.js", "runtime": "node", "configurationAttributes": { "launch": { "required": [ "appSrcRoot", "apkFile", "adbPort" ], "properties": { "amStartArgs": { "type": "array", "description": "Custom arguments to pass to the Android application manager to start the app. Run `adb shell am` to show valid arguments. Note that `-D` is required to enable debugging.\r\nBe careful using this option - you must specify the correct parameters or the app will not start.\r\n\r\nThis option is incompatible with the `launchActivity` option.", "default": [ "-D", "--activity-brought-to-front", "-a android.intent.action.MAIN", "-c android.intent.category.LAUNCHER", "-n package.name/launch.activity" ] }, "appSrcRoot": { "type": "string", "description": "Location of the App source files. This value must point to the root of your App source tree (containing AndroidManifest.xml)", "default": "${workspaceRoot}/app/src/main" }, "apkFile": { "type": "string", "description": "Fully qualified path to the built APK (Android Application Package)", "default": "${workspaceRoot}/app/build/outputs/apk/debug/app-debug.apk" }, "adbPort": { "type": "integer", "description": "Port number to connect to the local ADB (Android Debug Bridge) instance. Default: 5037", "default": 5037 }, "autoStartADB": { "type": "boolean", "description": "Automatically launch 'adb start-server' if not already started. Default: true", "default": true }, "callStackDisplaySize": { "type": "integer", "description": "Number of entries to display in call stack views (for locations outside of the project source). 0 shows the entire call stack. Default: 1", "default": 1 }, "launchActivity": { "type": "string", "description": "Manually specify the activity to run when the app is started.", "default": "" }, "logcatPort": { "type": "integer", "description": "Port number to use for the internal logcat websocket link. Changes to this value only apply when the extension is restarted. Default: 7038", "default": 7038 }, "manifestFile": { "type": "string", "description": "Overrides the default location of AndroidManifest.xml", "default": "${workspaceRoot}/app/src/main/AndroidManifest.xml" }, "pmInstallArgs": { "type": "array", "description": "APK install arguments passed to the Android package manager. Run 'adb shell pm' to show valid arguments. Default: [\"-r\"]", "default": [ "-r" ] }, "postLaunchPause": { "type": "number", "description": "Time in milliseconds to wait after launching an app before attempting to attach the debugger. Default: 1000", "default": 1000 }, "staleBuild": { "type": "string", "description": "Launch behaviour if source files have been saved after the APK was built. One of: [\"ignore\" \"warn\" \"stop\"]. Default: \"warn\"", "default": "warn" }, "targetDevice": { "type": "string", "description": "Target Device ID (as indicated by 'adb devices'). Use this to specify which device is used for deployment when multiple devices are connected.", "default": "${command:PickAndroidDevice}" }, "trace": { "type": "boolean", "description": "Set to true to output debugging logs for diagnostics", "default": false } } }, "attach": { "required": [ "appSrcRoot", "adbPort", "processId" ], "properties": { "appSrcRoot": { "type": "string", "description": "Location of the App source files. This value must point to the root of your App source tree (containing AndroidManifest.xml)", "default": "${workspaceRoot}/app/src/main" }, "adbPort": { "type": "integer", "description": "Port number to connect to the local ADB (Android Debug Bridge) instance. Default: 5037", "default": 5037 }, "processId": { "type": "string", "description": "PID of process to attach to.\n\"${command:PickAndroidProcess}\" will display a list of debuggable PIDs to choose from during launch.", "default": "${command:PickAndroidProcess}" }, "targetDevice": { "type": "string", "description": "Target Device ID (as indicated by 'adb devices'). Use this to specify which device is used when multiple devices are connected.", "default": "${command:PickAndroidDevice}" }, "trace": { "type": "boolean", "description": "Set to true to output debugging logs for diagnostics", "default": false } } } }, "initialConfigurations": [ { "type": "android", "request": "launch", "name": "Android launch", "appSrcRoot": "${workspaceRoot}/app/src/main", "apkFile": "${workspaceRoot}/app/build/outputs/apk/debug/app-debug.apk", "adbPort": 5037 }, { "type": "android", "request": "attach", "name": "Android attach", "appSrcRoot": "${workspaceRoot}/app/src/main", "adbPort": 5037, "processId": "${command:PickAndroidProcess}" } ], "configurationSnippets": [ { "label": "Android: Launch Application", "description": "A new configuration for launching an Android app debugging session", "body": { "type": "android", "request": "launch", "name": "${2:Android Launch}", "appSrcRoot": "^\"\\${workspaceRoot}/app/src/main\"", "apkFile": "^\"\\${workspaceRoot}/app/build/outputs/apk/debug/app-debug.apk\"", "adbPort": 5037 } }, { "label": "Android: Attach to Process", "description": "A new configuration for attaching to a running Android app process", "body": { "type": "android", "request": "attach", "name": "${2:Android Attach}", "appSrcRoot": "^\"\\${workspaceRoot}/app/src/main\"", "adbPort": 5037, "processId": "^\"\\${command:PickAndroidProcess}\"" } } ], "variables": {} } ] }, "scripts": { "postinstall": "cd langserver && npm install && cd ..", "test": "node ./node_modules/vscode/bin/test" }, "dependencies": { "long": "4.0.0", "unzipper": "0.10.11", "uuid": "8.2.0", "vscode-debugadapter": "1.40.0", "vscode-debugprotocol": "1.40.0", "vscode-languageclient": "6.1.3", "ws": "7.3.0", "xmldom": "0.1.31", "xpath": "0.0.27" }, "devDependencies": { "@types/mocha": "^5.2.5", "@types/node": "^10.12.5", "@types/vscode": "^1.24.0", "eslint": "^5.9.0", "mocha": "^5.2.0", "typescript": "^3.8.3" } }