agrabhi / logcat

9 stars 7 forks source link

View Adroid Logcat in VSCode

The extension enables you to view (filtered) logcat from android devices in VSCode.

It shows the output of adb logcat -v threadtime command in a 'new document' in VScode. The name of document is current timestamp.

The new docuemnt is created in a folder of your choice or %temp%\vslogcat folder.

If filter string has been specified adb logcat | findstr (egrep on linux) is executed.

Automatic support for regular expressions.

Usage

Available Commands and shortcuts

  • Logcat Start (ctrl+l ctrl+s): Start capturing the logcat
  • Logcat End (ctrl+l ctrl+e): Stop capturing the logcat
  • Logcat Clear (ctrl+l ctrl+c): Clear the existing logcat buffer in system.

How To Use

  1. Press F1 and type command Logcat Start (ctrl+l ctrl+s) .
  2. You will see an input box. Type the semicolon delimited filter string there eg "fatal;exception"
  3. You can also use regular expressions.
  4. Press escape or enter and the logcat will strat streaming in the current document.
  5. To stop press F1 and type command Logcat End (ctrl+l ctrl+e).
  6. You can also save the logcat.

Available Settings

  1. "logcat.directory" : Specifies the folder path where logcat files will be created intially. If you don't specify this, the files will be created in %temp%\vslogcat folder.

Tips

  • The command status is shown in status bar messages.

  • Its a good practice to clear the logcat first using Logcat Clear command and then run the scenario. It will make sure you don't get unnecessary spew in your logcat.

  • The file is already created on system, you can just press save anytime to save logcat and retrieve it later.

Prerequisite

  • adb should be installed on your system.

  • adb should be added in PATH environment variable.

  • You can find plenty of information on how to do above on the internet.

Feedback and Bugs

Please log issues at https://github.com/agrabhi/logcat/issues

Please dont forget to Rate this extension.

How to update

Launch the VS Code Command Pallete - Ctrl+P - and type the command ext update logcat

For more info visit https://code.visualstudio.com/Docs/editor/extension-gallery#_update-an-extension

My other extensions:

https://marketplace.visualstudio.com/search?term=publisher%3A%22abhiagr%22&target=VSCode&sortBy=Relevance

Changelog

Version 0.0.6

Version 0.0.5

Version 0.0.4

Version 0.0.2

Version 0.0.1