Search code examples
macosionic-frameworkvisual-studio-codeadbmacos-catalina

Error in VSCode: 'Unable to find adb'. Adb is in the path of my Mac OS Catalina


After upgrading to Mac Catalina I can't debug my ionic app anymore ... When I try to debug on device or emulator it gives me this error.

Attaching to android Unable to find adb. Please ensure it is in your PATH and re-open Visual Studio Code

If I do on terminal inside or outside vscode

$adb devices

I get:

List of devices attached
42003f1d9610c50b    device

So adb is in the path.

I even tried to launch VSCode from terminal

code <myFolder>

after doing this: shell command install code

But I still get the same error.

How can I tell VSCode the path to adb?


Solution

  • I set in .zshrc

    export ANDROID_HOME=/Users/$USER/Library/Android/sdk
    export ANDROID_SDK_ROOT=$ANDROID_HOME
    PATH="$PATH:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools"
    

    And to see in VS Code The PATH environment variable process context.

    open Help -> Toggle Developer Tools -> open Console ->

    run console.log(process.env.PATH) command
    

    And after updating Catalina is working !