adelphes / android-dev-ext

Android debugging support for VS Code
https://marketplace.visualstudio.com/items?itemName=adelphes.android-dev-ext
MIT License
217 stars 29 forks source link

Debugger suddently stop without message #149

Open martinbonneau opened 4 months ago

martinbonneau commented 4 months ago

Hi, thanks for your work !

I was trying to use your debugger but I have some troubles with it. My configuration seams well as far as I don't get any error using Launch : the installation is successfull on the AVD (AS not running), attaching debugger looks successfull too, but no breakpoint are activated and, if i try to add new one, the debugger stop without error message in console.

Kinda the same behavior when i attach to existing app : telling me that it's successfull attached and directly stop.

I try to use the debugger from decompiled APK, idk if it's supported but i presume yes since someone made an article on the subject ! I'm not sure what I do wrong, please find my config file + console output when Launching. Maybe it's about the appSrcRoot but not really sure since no error telling me ources are not found is triggered !

Checking build
Warning: Build is not up-to-date. Source files may not match execution when debugging.
Searching for devices...
Found 1 device
Deploying current build...
Installing...
Launching on device emulator-5554 [API:35]
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x400000 cmp=owasp.mstg.uncrackable1/sg.vantagepoint.uncrackable1.MainActivity }
Application started
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "android",
            "request": "launch",
            "name": "Android launch",
            "appSrcRoot": "${workspaceRoot}",
            "apkFile": "${workspaceRoot}/dist/UnCrackable-Level1.apk",
            "adbPort": 5037
        },
        {
            "type": "android",
            "request": "attach",
            "name": "Android attach",
            "appSrcRoot": "${workspaceRoot}",
            "adbPort": 5037,
            "processId": "${command:PickAndroidProcess}"
        }
    ]
}

Note : the mentionned article

Thanks a lot, Bests

max-kamps commented 1 week ago

I think I may be running into the same problem.

Every time the debugger suddenly stops, I can see this message in the Extension Host output: [error] Error: Invalid debug adapter, followed by a useless (to me) stack trace of minified VSCode internals.

This issue might be related: https://github.com/microsoft/vscode/issues/196948