Commit Graph

24 Commits

Author SHA1 Message Date
Dave Holoway
6439e1b8b7 Version 1.1 improvements (#88)
* fix 0 alignment in binary xml decoding

* output reason for APK manifest read failure

* try and match package name against process name
when determining which pid to attach

* make post launch pause user-configurable

* code tidy, jsdocs and types

* more types in expression parse classes

* fix issue with expandable objects not evaluating

* update build task example

* fix package/type evaluation

* improve handling of targetDevice and processID combinations

* show full call stack by default

* implement a queue for evaluations

* improve performance of retrieving single fields

* check root term identifiers against this fields
2020-04-24 19:03:39 +01:00
Dave Holoway
44d887dd6c Support attaching to running app (#85)
* add support for timeout on adb socket reads

* add debugger support for attaching to a process

* add new launch configuration and support for picking an Android process ID

* initial support for attaching to android process

* display enhanced quick pick list with pids and names

* add flag to prevent disconnect messages when not connected

* Retrieve all loaded classes during startup.
This allows us to identify breakpoints in anonymous classes that are already loaded.

* correct name of process picker command

* make PickAndroidProcess command private

* selectAndroidProcessID always returns an object

* make breakpoint setup a loop instead of recursive

* tidy some labels and error messages

* use a more consistent command for retrieving process names

* show pid list sorted by pid instead of name

* refactor some Android and ADB-specific functions
Check ANDROID_SDK as replacement for ANDROID_HOME

* tidy up logcat launch and refactor target device selection

* fix logcat not displaying

* filter duplicates and blanks from logcat output
2020-04-23 13:28:03 +01:00
Dave Holoway
9aeca6b96b support custom launch arguments (#84)
* add amStartArgs launch property to allow launch command arguments to be customised.

* update readme launch options docs
2020-04-23 13:27:17 +01:00
Dave Holoway
0672e54401 Version 1 (#83)
* replace jq-promises with native Promises

* updates to use native promises and async await

* Fix variable errors, remove extra parameters and correct export declaratons

* refactor launch request to use async/await

* fix running debugger on custom ADB port

* remove unused files

* move socket_ended check to ensure we don't loop reading 0 bytes

* refactor logcat code and ensure disconnect status is passed on to webview

* Fix warnings

* Clean up util and remove unused functions

* convert Debugger into a class

* update jsconfig target to es2018 and enable checkJS

* more updates to use async/await and more readable refactoring.

- added type definitions and debugger classes
- improved expression evaluation
- refactored expressions into parsing, evaluation and variable assignment
- fixed invoking methods with parameters
- added support for static method invokes
- improved exception display reliability
- refactored launch into smaller functions
- refactored utils into smaller modules
- removed redundant code
- converted JDWP functions to classes

* set version 1.0.0 and update dependencies

* add changelog notes
2020-04-20 12:53:08 +01:00
Dave Holoway
8cc31476b3 fix breakpoints don't trigger when hit (#37)
* add errorcode to empty jdwp results

* use an empty line table if the command request fails
2018-11-11 15:20:28 +00:00
adelphes
5f0a02b17f add basic support for kotlin source files 2018-05-06 20:02:31 +01:00
adelphes
130d79f6c2 add initial support for method call expressions 2017-06-24 12:02:36 +01:00
adelphes
fdbd5df16b Improvements to multi-threaded debugging
Separate out thread-specific parts
Only pause event thread for step, bp and thread events
Continue now resumes the specified thread instead of all threads
Prioritise stepping thread to prevent context switching during step
Monitor thread starts/ends
2017-02-05 19:34:12 +00:00
adelphes
3cda2e5f1f Fix issue with exception breaks hanging
Temporarily resume the thread used to invoke toString() and re-suspend after.
2017-02-02 20:04:04 +00:00
adelphes
dfed765d21 Fix issue with crash on exception break 2017-02-02 19:19:20 +00:00
adelphes
7b670b36ad Improve breakpoint searching
Search for inner types when identifying breakpoint locations
2017-02-01 10:13:02 +00:00
adelphes
d1ab9a8339 Android debugger class enhancements
Support for thread info - name and status
Reference count global suspends to allow correct resuming when multiple events are triggered.
Added methods for suspend/resume individual threads
2017-02-01 10:10:22 +00:00
adelphes
a677d636f3 Fix #17
Clear last step request on exception break
2017-01-31 15:00:45 +00:00
adelphes
2727dd1b0c Refactored setBreakPointsRequest
Breakpoints are now updated using an async queue
Allow source locations inside ANDROID_HOME
Fixes #14
2017-01-31 13:40:54 +00:00
adelphes
ec38695bcc include type info when reporting missing fields
Store character primitives as a uint16 integer with a separate char field.
2017-01-29 19:06:32 +00:00
adelphes
88c20d6470 implement a more reliable evaluation queue 2017-01-28 19:12:35 +00:00
adelphes
6f3f5eee74 Improve expression parsing
Allow ':super' to be used as a member.
Search super types when locating field members.
Fixes #16
2017-01-28 15:54:26 +00:00
adelphes
1b7fb3d60a first pass at hit-count breakpoints 2017-01-27 13:59:36 +00:00
adelphes
6bb8047db6 Stop the Android runtime from barfing into logcat
Split field retrieval into statics and instances
2017-01-26 17:58:37 +00:00
adelphes
0931d8747b Various fixes.
Fixes for null source location issues
Retrieve locals on a per-frame basis using a common promise for both scope variables and watches
Fix for string char retrieval (removed closure index)
Better support for displaying Android sources
Display device API level during launch
2017-01-26 16:29:02 +00:00
adelphes
53a368fc46 Update behaviour of break-on-exception
Altered so that uncaught exceptions never have a filter applied.
Fixes #5
2017-01-26 11:09:50 +00:00
adelphes
b6591e0bcf added support for exception breakpoints 2017-01-24 01:05:04 +00:00
adelphes
544461335a reformatted source 2017-01-24 00:48:00 +00:00
adelphes
ec258a6ddb Relocate code into src folder 2017-01-22 16:09:35 +00:00