Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(702)

Unified Diff: runtime/vm/debugger.cc

Issue 145323002: Post-meetup feature extravaganza. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
===================================================================
--- runtime/vm/debugger.cc (revision 32126)
+++ runtime/vm/debugger.cc (working copy)
@@ -696,6 +696,36 @@
}
+void ActivationFrame::PrintToJSONObject(JSONObject* jsobj) {
+ intptr_t line = LineNumber();
+ const Script& script = Script::Handle(SourceScript());
+
+ jsobj->AddProperty("script", script);
+ jsobj->AddProperty("line", line);
+ jsobj->AddProperty("col", ColumnNumber());
+ jsobj->AddProperty("function", function());
+ jsobj->AddProperty("code", code());
+
+ // TODO(turnidge): Consider dropping lineString from the frame.
+ String& line_string = String::Handle(script.GetLine(line));
+ jsobj->AddProperty("lineString", line_string.ToCString());
+ {
+ JSONArray jsvars(jsobj, "vars");
+ const int num_vars = NumLocalVariables();
+ for (intptr_t v = 0; v < num_vars; v++) {
+ JSONObject jsvar(&jsvars);
+ String& var_name = String::Handle();
+ Instance& var_value = Instance::Handle();
+ intptr_t unused;
+ VariableAt(v, &var_name, &unused, &unused, &var_value);
+ jsvar.AddProperty("name", var_name.ToCString());
+ jsvar.AddProperty("value", var_value);
+ }
+ }
+}
+
+
+
void DebuggerStackTrace::AddActivation(ActivationFrame* frame) {
if (frame->function().is_visible()) {
trace_.Add(frame);
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/debugger_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698