hausner@google.com
3f40651e3a
Support evaluation of expressions in context of a stack frame
...
This change adds a debugger API function to evaluate an expression
in the context of a particular stack frame. The expression can
refer to local variables accessible in the frame, but it cannot
alter the variables.
R=regis@google.com
Review URL: https://codereview.chromium.org//249533003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35340 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 22:56:23 +00:00
hausner@google.com
ea84b80f47
Add class id to debugger stack trace
...
Add the class id of the origin class of each activation frame’s function.
Top-level functions have no class id. The wire protocol for an activation
frame now looks like this:
CallFrame = “{“ functionName “:” String “,”
[ location “:” Location “,” ]
[ classId “:” Integer “,” ]
locals “:” NamedObjList “}“
R=devoncarew@google.com
Review URL: https://codereview.chromium.org//242453011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35232 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-21 23:16:41 +00:00
turnidge@google.com
b891e78325
Post-meetup feature extravaganza.
...
Remodel the top-level isolate summary page.
Add variables to stack frames in the stack trace.
Stop putting small integers and bools in the object id ring.
Rework how we pass down null references (and null-like references like
uninitialized values).
Collect all isolate timers by default.
Change the lifetime of IsolateSpawnState so that we can refer to it
later to know how an isolate started up. Stop pretending that
IsolateSpawnState is a void*. Clean up vestigial IsolateStartData.
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//145323002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32128 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-29 18:40:12 +00:00
turnidge@google.com
b640712e6b
Handle vmservice messages while at breakpoint.
...
Allow rudimentary inspection of breakpoints from vmservice.
R=hausner@google.com , johnmccutchan@google.com
Review URL: https://codereview.chromium.org//113513004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31233 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-18 17:45:17 +00:00
hausner@google.com
55c283a672
Transmit breakpoint id on paused event
...
Breakpoint callback get an additional parameter to receive the id of the breakpoint that was hit, or 0 if the debugger pauses due to stepping.
R=turnidge@google.com
Review URL: https://codereview.chromium.org//110913002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31029 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 17:41:05 +00:00
rmacnak@google.com
af3f18fa84
Add an API function to get a debugger stack trace from an error handle.
...
BUG=http://dartbug.com/14322
R=asiva@google.com
Review URL: https://codereview.chromium.org//51793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30323 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-15 23:42:23 +00:00
hausner@google.com
0673063f57
Add closure object type to debugger wire protocol
...
R=devoncarew@google.com
Review URL: https://codereview.chromium.org//61153006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30289 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-14 19:42:14 +00:00
hausner@google.com
14489dd0f0
Add Dart_GetClosureInfo
...
Will be used by debugger wire protocol.
R=regis@google.com
Review URL: https://codereview.chromium.org//65383007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30162 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-11 18:22:05 +00:00
jacobr@google.com
761c1de735
Fix to asiva's code review comments on TBR Cl.
...
BUG=
R=asiva@google.com
Review URL: https://codereview.chromium.org//49613002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29390 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 20:23:19 +00:00
rmacnak@google.com
89d5616468
Never return a Dart_Handle on a dart::Class from the embedding API.
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//24210003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27715 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-20 18:29:56 +00:00
jacobr@google.com
cac607707a
Make Dart_ScriptGetTokenInfo account for line_offset() and col_offset()
...
Cleanup bugs in wrapExpressionAsClosure Fix bug in how setters were handled and filter out 'this' from local variables list.
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//23526056
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27581 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-17 20:52:22 +00:00
jacobr@google.com
d9f7cc5099
Add "function" as an argument to Dart_ActivationFrameInfo
...
BUG=
R=hausner@google.com
Review URL: https://codereview.chromium.org//23609032
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27440 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 17:45:42 +00:00
hausner@google.com
f82de66060
Evaluation of expression in context of library top-level
...
Third and final part of expression evaluation in the context
of an (object|class|library).
R=iposva@google.com
Review URL: https://codereview.chromium.org//23514020
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26898 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-29 23:24:23 +00:00
hausner@google.com
2642b1e522
Evaluate expression in the context of a class
...
Allows debugger to evaluate an expression in the context of a
static method of a class.
R=srdjan@google.com
Review URL: https://codereview.chromium.org//23102019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26617 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-23 22:42:41 +00:00
hausner@google.com
d62ea57f8e
Evaluate expression in context of an object
...
This is the core functionality needed for the debugger.
Review URL: https://codereview.chromium.org//23067006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26328 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-19 22:17:09 +00:00
asiva@google.com
417a55d314
Allow type objects to be passed in to Dart_GetStaticFields
...
(This is in sync with the change to have the entire Dart API surface
accept type objects instead of exposing the class objects).
R=jacobr@google.com
Review URL: https://codereview.chromium.org//19713002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25137 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-18 00:28:03 +00:00
asiva@google.com
5f0c327096
Add Dart_GetSupertype to the dart debugger API so that the dartium
...
debugger interface can use this instead of Dart_GetSuperClass.
R=regis@google.com
Review URL: https://codereview.chromium.org//18238003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24648 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-01 19:46:42 +00:00
hausner@google.com
df5c543b6f
Add library id, location info to breakpointResolved event
...
Review URL: https://codereview.chromium.org//13940008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21592 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 23:24:21 +00:00
hausner@google.com
89949d455b
Deprecate old debugger breakpoint handler
...
- Add new breakpoint handler callback that does not take a
stack trace
- Remove deprecated handler from debugger core
- Adjust tests
- Old breakpoint handler support remain in code until Dartium
switches to new handler.
Review URL: https://codereview.chromium.org//14298002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21569 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-16 19:42:39 +00:00
hausner@google.com
268bdbc85f
More cleanups in debugger API and wire protocol
...
Review URL: https://codereview.chromium.org//13975018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21392 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 21:49:24 +00:00
hausner@google.com
8b71446903
Remove legacy debugger API stuff. The removed functions do not appear to be used in Dartium.
...
Review URL: https://codereview.chromium.org//14029016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21305 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-11 19:26:25 +00:00
hausner@google.com
1a4d308dea
Add library id to code location object
...
Add libraryId field to the JSON Location object in the debugger
wire protocol.
Review URL: https://codereview.chromium.org//13771013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21098 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-08 18:31:56 +00:00
hausner@google.com
ee69789e07
Add line table command to debugger
...
New command returns token information of a script. This will enable
the editor/debugger to translate token offsets to line numbers.
Review URL: https://codereview.chromium.org//13533016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21009 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 23:45:14 +00:00
hausner@google.com
b0b38313ec
Add text location in debugger event
...
- Adding token number in text location data. Line number will be
removed when the editor knows how to convert a token number to its
line number.
- "location" field in stack frames is now optional. If it is not present, there
is no corresponding textual location for the code location.
- Add location info of "paused" and "interrupted" events.
Stack trace will go away in these events.
Review URL: https://codereview.chromium.org//13144018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20816 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 20:41:29 +00:00
asiva@google.com
6e878e9c12
Remove Dart_GetScriptSource as it is not used anywhere.
...
Review URL: https://codereview.chromium.org//12732007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19998 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 10:18:00 +00:00
asiva@google.com
6b8987e55b
Add a command line option to generate source code for a script
...
(apparently this would be useful for pretty printing the output of
dart2dart)
Review URL: https://codereview.chromium.org//12517005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19996 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 09:47:46 +00:00
tball@google.com
4c4482e4c7
Initial prototype of vmstats support, based on Dart VM Stats draft design doc.
...
Review URL: https://codereview.chromium.org//12221022
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19091 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-26 22:34:08 +00:00
hausner@google.com
c3a133777d
Add function for one-time stop at function entry
...
Adds function Dart_OneTimeBreakAtEntry()
Used by debugger clients to stop at the beginning of the program without setting a user-visible breakpoint.
Review URL: https://codereview.chromium.org//11926026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17332 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-19 00:03:30 +00:00
asiva@google.com
ceed3e5beb
- Add support to interrupt a running isolate with the following command:
...
<=== InterruptCmd = "{" RequestId "," command ":" interrupt "," params ":" "{" isolateId ":" Integer "}" "}"
===> InterruptCmdResp = "{" RequestId "}"
- Send isolate events over to the debugger client in the following format:
===> "{" event ":" isolate "," params ":" "{" reason ":" created "," id ":" Integer "}" "}"
===> "{" event ":" isolate "," params ":" "{" reason ":" shutdown "," id ":" Integer "}" "}"
===> "{" event ":" paused "," params ":" "{" reason ":" interrupted "," callFrames ":" StackTrace "}" "}"
- Added id ";" Integer, to params in all paused events messages
- create per isolate debugger message queues, instead of the global static one
- Add 'i' command in ddbg to exercise the interrupt feature
- Add support for handling isolave event messages in ddbg
Review URL: https://codereview.chromium.org//11028040
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13333 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-05 23:10:28 +00:00
asiva@google.com
6076250adb
1. Create a port when a debugger object is created for an isolate, use this
...
port as the unique ID to represent an isolate in the debugger message
format.
2. Switch the Event handler API to use an isolate id instead of the isolate
object itself.
3. Add a unit test case for isolate debugger event handling with an
interrupt of isolate to ensure that interrupting the isolate runs
the interrupt event handler.
Review URL: https://codereview.chromium.org//11052006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13207 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 00:13:37 +00:00
asiva@google.com
27e1b05914
Add isolate event handler setup in order to be able to propagate isolate
...
events (create/shutdown/interrupted)
Review URL: https://codereview.chromium.org//11026011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13130 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 18:09:55 +00:00
devoncarew@google.com
fdae229dcc
Fix for http://code.google.com/p/dart/issues/detail?id=5085 - break-on-exceptions in the debugger can recurse.
...
This CL turns off the break-on-exceptions behavior when evaluating Dart code in the debugger (in particular, the toString() method).
Review URL: https://chromiumcodereview.appspot.com//10928149
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12275 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 18:01:50 +00:00
hausner@google.com
67191621a4
Debugger API to enable/disable debugging of libraries
...
Review URL: https://chromiumcodereview.appspot.com//10797033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9772 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-19 22:51:09 +00:00
hausner@google.com
fbeaabda52
Debugger support to display global variables
...
- Add library id to ActivationFrame
- Add debugger function to get all global variables visible in
a library (including imported variables).
- Add LibraryPrefixIterator
- Fix Dart_GetLibraryImports
Review URL: https://chromiumcodereview.appspot.com//10657048
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9121 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-26 17:32:34 +00:00
hausner@google.com
a1cb082925
Add API to configure debugger pause on exception
...
Still to be done: proper determination whether an exception is
handled or unhandled. We still assume that TypeError and AssertionError
exceptions are unhanded.
Review URL: https://chromiumcodereview.appspot.com//10540121
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8579 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 21:56:50 +00:00
turnidge@google.com
312702a5ac
Second local mirrors CL.
...
Implement a few chunks of new mirror functionality. Many changes, notably:
- Added currentIsolateMirror() to provide non-async access to the
local isolate mirror.
- Added mirrorOf(o) to provide access to local instance mirrors.
- Fleshed out InstanceMirror, InterfaceMirror, and LibraryMirror to
various degrees.
- Added the MirroredError hierarchy, which lets the user handle Dart
errors of various sorts from invocation, etc.
- Introduce lazy resolvers for interface mirrors and library mirrors.
These allow us to build the self-referential library/interface
hierarchy without going mad.
- Added better toStrings all around.
- Extended the isolate_mirror_local_test to cover new functionality.
Other changes that were required or seemed prudent:
- Exposed the error hierarchy to the embedder. They need to be able
to distinguish different error types in some situations. Improved
the documetation around error handles and error propagation.
- Added new functions to the dart embedding api as required. Added
tests for all new dart api functions.
Review URL: https://chromiumcodereview.appspot.com//10538043
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8575 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 21:07:49 +00:00
hausner@google.com
eebec2a081
Debugger break on TypeError, AssertionError
...
Add debugger functionality to pause the VM whenever a TypeError
or AssertionError exception happens.
This is a first step towards breaking on handled and unhanded
exceptions in general. We first need to generate more debug info
for catch handlers so we can determine whether an exception will
be handled or not before we unwind the stack to run the catch
clauses.
Review URL: https://chromiumcodereview.appspot.com//10537065
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8457 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 17:51:50 +00:00
hausner@google.com
c39f48340d
Add string encoding to wire protocol
...
Also, add command to retrieve the source text of a given script.
Review URL: https://chromiumcodereview.appspot.com//10496006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8220 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-02 00:07:12 +00:00
turnidge@google.com
ec36e02c28
Remove the partially completed code for remote IsolateMirrors and
...
replace it with the beginnings of a local (same isolate) IsolateMirror
implementation.
Removed old mirror tests and added two new mirror tests.
Even though mirrors.cc is part of the vm, I chose to implement most of
it using the dart embedding interface instead of our internal
interfaces because the embedding interface was more convenient.
mirrors.cc is basically all new in this CL -- don't pay any attention
to diffs for that file.
Added dart embedding functions required for the functionality in this
CL: Dart_DebugName, Dart_GetNativeInstanceFieldCount,
Dart_RootLibrary, Dart_RegisteredLibraryUrls, and Dart_LibraryName.
Extended or modified some existing dart api functions, primarily to
make them propagate error handles properly.
Added tests for new dart embedding api functionality.
Added the ability to determine if a port is local to the current isolate.
Extended NotImplementedException to accept an optional string
argument. I wanted to give more descriptive error messages.
Review URL: https://chromiumcodereview.appspot.com//10416050
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8117 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 17:07:19 +00:00
hausner@google.com
eeaa660d52
Introduce library ids and info in the wire protocol
...
- Library hierarchy (imports, prefixes)
- Global (top-level) variables
- Removing breakpoints
Review URL: https://chromiumcodereview.appspot.com//10447045
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8075 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-29 19:51:51 +00:00
hausner@google.com
b00ae2d1a0
Introduce remote objects in Debugger protocol
...
Review URL: https://chromiumcodereview.appspot.com//10407071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7864 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-22 18:06:34 +00:00
hausner@google.com
de86bd5ed8
Debugger wire protocol: setting breakpoints
...
- Adding commands to set breakpoints and showing current stack trace.
- Adding a callback hook to signal when a breakpoint gets resolved to
and actual line number.
- Adding ids for breakpoints and new breakpoint API functions, deprecating
the existing ones.
- Adding one helper function to the JSON class
Anton may want to take a look at the JSON addition.
Review URL: https://chromiumcodereview.appspot.com//10383164
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7628 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-14 21:10:25 +00:00
hausner@google.com
6d9abc5e3b
StepOver, StepInto, StepOut
...
Implement single stepping in the debugger.
- Add PC descriptors for function return
- functions to set temporary breakpoints on all
locations in a function.
- patching/restoring of function return code pattern
- determine call target of instance calls
Review URL: https://chromiumcodereview.appspot.com//9484002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4639 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-27 22:00:28 +00:00
hausner@google.com
e1d0b0619b
Debugger API: get local variables of an activation frame
...
Also add a test case where the evaluation of a field name results in an error during the evaluation of the field.
Review URL: https://chromiumcodereview.appspot.com//9264058
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3738 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-31 18:10:08 +00:00
hausner@google.com
864393bdad
Add debugger functions to inspect objects and classes.
...
Next steps: inspect global variables, better support for inspecting local variables on stack.
Review URL: https://chromiumcodereview.appspot.com//9288071
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3634 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-27 00:27:12 +00:00
hausner@google.com
02d59f08ba
Add functions to list library and script urls in an isolate.
...
Review URL: https://chromiumcodereview.appspot.com//9117015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3571 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-24 21:33:04 +00:00
hausner@google.com
595cb76374
Implement deletion of breakpoints
...
- deletion of breakpoints
- better cleanup of debugger resources
Review URL: https://chromiumcodereview.appspot.com//9271008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3470 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-20 22:10:59 +00:00
hausner@google.com
3ebdf081ca
Set breakpoint at url, line number
...
Add debugger functionality to set breakpoint at given url and line number.
Review URL: https://chromiumcodereview.appspot.com//9240014
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3420 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-18 23:15:56 +00:00
hausner@google.com
75918306af
First debugger API unit test
...
Add unit test file, expose more debugger functionality in the API.
Review URL: http://codereview.chromium.org//8872049
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2320 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-09 19:29:37 +00:00
hausner@google.com
9159389495
First bits of external debugger API
...
The debugger API is in a separate set of files. Embedders do not have
to include the debug api if they don't need to.
Review URL: http://codereview.chromium.org//8826007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2198 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-07 22:13:49 +00:00