{"id":14108897,"url":"https://github.com/adelphes/android-dev-ext","last_synced_at":"2025-04-07T13:07:32.451Z","repository":{"id":16331520,"uuid":"79726687","full_name":"adelphes/android-dev-ext","owner":"adelphes","description":"Android debugging support for VS Code","archived":false,"fork":false,"pushed_at":"2024-08-06T21:55:06.000Z","size":12612,"stargazers_count":223,"open_issues_count":38,"forks_count":29,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-31T11:04:39.575Z","etag":null,"topics":["android","debugger","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=adelphes.android-dev-ext","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adelphes.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2017-01-22T15:43:01.000Z","updated_at":"2025-03-28T10:43:36.000Z","dependencies_parsed_at":"2024-08-14T10:11:29.522Z","dependency_job_id":"c79f1d1f-1335-45a3-87d1-1a51965a5727","html_url":"https://github.com/adelphes/android-dev-ext","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelphes%2Fandroid-dev-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelphes%2Fandroid-dev-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelphes%2Fandroid-dev-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adelphes%2Fandroid-dev-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adelphes","download_url":"https://codeload.github.com/adelphes/android-dev-ext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247657281,"owners_count":20974345,"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":["android","debugger","vscode","vscode-extension"],"created_at":"2024-08-14T10:01:53.567Z","updated_at":"2025-04-07T13:07:32.436Z","avatar_url":"https://github.com/adelphes.png","language":"JavaScript","funding_links":["https://www.buymeacoffee.com/adelphes"],"categories":["JavaScript"],"sub_categories":[],"readme":"# Android for VS Code\n\nThis 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.\n\n## What's New\n- Java Intellisense for Android is now in beta.\n\n## Features\n* Line by line code stepping\n* Breakpoints\n* Variable inspection and modification\n* Logcat viewing [ Command Palette -\u003e Android: View Logcat ]\n* Break on exceptions\n* Step through Android sources\n\n## Requirements\n\nYou must have [Android SDK Platform Tools](https://developer.android.com/studio/releases/platform-tools.html) installed. This extension communicates with your device via the ADB (Android Debug Bridge) interface.  \n\u003e 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.\n\n## Limitations\n\n* This is a preview version so expect the unexpected. Please log any issues you find on [GitHub](https://github.com/adelphes/android-dev-ext/issues).  \n* This extension will not build your app.  \nIf you use gradle (or Android Studio), you can build your app from the command-line using `./gradlew assembleDebug` or configure a VSCode Build Task to run the command (see below).\n\u003e 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. See the section below on how to configure a VSCode Task to automatically build your app before launching a debug session.\n* Some debugger options are yet to be implemented. You cannot set conditional breakpoints and watch expressions must be simple variables.\n* If you require a must-have feature that isn't there yet, let us know on [GitHub](https://github.com/adelphes/android-dev-ext/issues).  \n\n## Extension Settings\n\nThis extension allows you to debug your App by creating a new Android configuration in `launch.json`.  \nThe following settings are used to configure the debugger:\n```jsonc\n    {\n        \"version\": \"0.2.0\",\n        \"configurations\": [\n            {\n                // configuration type, request  and name. \"launch\" is used to deploy the app\n                // to your device and start a debugging session.\n                \"type\": \"android\",\n                \"request\": \"launch\",\n                \"name\": \"Launch App\",\n\n                // Location of the App source files. This value must point to the root of\n                // your App source tree (containing AndroidManifest.xml).\n                \"appSrcRoot\": \"${workspaceRoot}/app/src/main\",\n\n                // Fully qualified path to the built APK (Android Application Package).\n                \"apkFile\": \"${workspaceRoot}/app/build/outputs/apk/app-debug.apk\",\n\n                // `host:port` configuration for connecting to the ADB (Android Debug Bridge) server instance.\n                // Default: localhost:5037\n                \"adbSocket\": \"localhost:5037\",\n\n                // Automatically launch 'adb start-server' if not already started.\n                // Default: true\n                \"autoStartADB\": true,\n\n                // Launch behaviour if source files have been saved after the APK was built.\n                // One of: [ ignore warn stop ]. Default: warn\n                \"staleBuild\": \"warn\",\n\n                // Target Device ID (as indicated by 'adb devices').\n                // Use this to specify which device is used for deployment\n                // when multiple devices are connected.\n                \"targetDevice\": \"\",\n\n                // Fully qualified path to the AndroidManifest.xml file compiled into the APK.\n                // Default: \"${appSrcRoot}/AndroidManifest.xml\"\n                \"manifestFile\": \"${workspaceRoot}/app/src/main/AndroidManifest.xml\",\n\n                // Custom arguments passed to the Android package manager to install the app.\n                // Run 'adb shell pm' to show valid arguments. Default: [\"-r\"]\n                \"pmInstallArgs\": [\"-r\"],\n\n                // Custom arguments passed to the Android application manager to start the app.\n                // Run `adb shell am` to show valid arguments.\n                // Note that `-D` is required to enable debugging.\n                \"amStartArgs\": [\n                    \"-D\",\n                    \"--activity-brought-to-front\",\n                    \"-a android.intent.action.MAIN\",\n                    \"-c android.intent.category.LAUNCHER\",\n                    \"-n package.name/launch.activity\"\n                ],\n\n                // Manually specify the activity to run when the app is started. This option is\n                // mutually exclusive with \"amStartArgs\".\n                \"launchActivity\": \".MainActivity\",\n\n                // Time in milliseconds to wait after launching an app before attempting to attach\n                // the debugger. Default: 1000ms\n                \"postLaunchPause\": 1000,\n\n                // Set to true to output debugging logs for diagnostics.\n                \"trace\": false\n            }\n        ]\n    }\n```\n\n## Building your app automatically\n\nThis extension will not build your App. If you would like to run a build each time a debug session is started, you can add a `preLaunchTask` option to your `launch.json` configuration which invokes a build task.\n\n#### .vscode/launch.json\nAdd a `preLaunchTask` item to the launch configuration:\n```json\n{\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n        {\n            \"type\": \"android\",\n            \"request\": \"launch\",\n            \"name\": \"App Build \u0026 Launch\",\n            \"preLaunchTask\": \"run gradle\",\n            ...\n        }\n    ]\n}\n```\nAdd a new task to run the build command:\n#### .vscode/tasks.json\n```json\n{\n    \"version\": \"2.0.0\",\n    \"tasks\": [\n        {\n            \"label\": \"run gradle\",\n            \"type\": \"shell\",\n            \"command\": \"${workspaceFolder}/gradlew\",\n            \"args\": [\n                \"assembleDebug\"\n            ],\n            \"presentation\": {\n                \"echo\": true,\n                \"reveal\": \"always\",\n                \"focus\": false,\n                \"panel\": \"shared\",\n                \"showReuseMessage\": true,\n                \"clear\": false\n            },\n            \"problemMatcher\": [],\n            \"group\": {\n                \"kind\": \"build\",\n                \"isDefault\": true\n            }\n        }\n    ]\n}\n```\n\n## Java Intellisense\nSupport for Java Intellisense is currently in beta, so any **feedback is appreciated**.  \n\nTo use Java intellisense, make sure the option is enabled in Settings (Extensions \u003e Android \u003e Enable Java language support for Android)\nand press `ctrl/cmd-space` when editing a Java source file.\n\nYou can read more about using code-completion on the [VSCode website](https://code.visualstudio.com/docs/editor/intellisense) and how to configure code-completion to suit your Android project in the [wiki](https://github.com/adelphes/android-dev-ext/wiki).  \n\n![Java Intellisense](https://raw.githubusercontent.com/adelphes/android-dev-ext/master/images/java-intellisense.png)\n\n## Expression evaluation\n\nFormat specifiers can be appended to watch and repl expressions to change how the evaluated result is displayed.\nThe specifiers work with the same syntax used in Visual Studio.\nSee https://docs.microsoft.com/en-us/visualstudio/debugger/format-specifiers-in-cpp for examples.\n\n```\n123              123\n123,x            0x0000007b\n123,xb           0000007b\n123,X            0x0000007B\n123,o            000000000173\n123,b            0b00000000000000000000000001111011\n123,bb           00000000000000000000000001111011\n123,c            '{'\n\"one\\ntwo\"       \"one\\ntwo\"\n\"one\\ntwo\",sb    one\\ntwo\n\"one\\ntwo\",!     one\n                 two\n```\n\nYou can also apply the specifiers to object and array instances to format fields and elements:\n```\narr,x            int[3]\n   [0]           0x00000001\n   [1]           0x00000002\n   [1]           0x00000003\n```\n\n\nNote: Format specifiers for floating point values (`e`/`g`) and string encoding conversions (`s8`/`su`/`s32`) are not supported.\n\n\n## Powered by coffee\n\nThe Android Developer Extension is a completely free, fully open-source project. If you've found the extension useful, you\ncan support it by [buying me a coffee](https://www.buymeacoffee.com/adelphes).\n\nIf you use ApplePay or Google Pay, you can scan the code with your phone camera:\n\n![BuyMeACoffee Code](https://raw.githubusercontent.com/adelphes/android-dev-ext/master/images/bmac-code.png)\n\nEvery coffee makes a difference, so thanks for adding your support.\n\n## Questions / Problems\n\nIf you run into any problems, tell us on [GitHub](https://github.com/adelphes/android-dev-ext/issues) or contact me on [Twitter](https://twitter.com/daveholoway).\n\n![Launch Android App](https://raw.githubusercontent.com/adelphes/android-dev-ext/master/images/demo.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadelphes%2Fandroid-dev-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadelphes%2Fandroid-dev-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadelphes%2Fandroid-dev-ext/lists"}