Skip to content

Commit 681e2e7

Browse files
committed
can enter child scope in debugger
1 parent 866edbe commit 681e2e7

File tree

5 files changed

+14
-2
lines changed

5 files changed

+14
-2
lines changed

graph.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ module.directive 'graph', ($location) ->
7575
$scope.edit_node = (node) ->
7676
$location.path "/#{node.implementation.id}"
7777

78+
# update debugger
79+
new_debugger_scope = $scope.$root.debugger_scope?.nodes[node.id]
80+
if new_debugger_scope?
81+
$scope.$root.debugger_scope = new_debugger_scope
82+
7883
$scope.can_bust_selected_node = ->
7984
$scope.selection.length is 1 and $scope.selection[0].implementation instanceof interpreter.Graph
8085
$scope.bust_selected_node = ->

graph.js

Lines changed: 6 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stuff.coffee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ module.controller 'subroutine', ($scope, $routeParams, interpreter, $q) ->
175175

176176
module.controller 'debugger', ($scope, $location) ->
177177
$scope.debug = ->
178+
$scope.$root.debugger_scope = $scope.$root.runtime.scope
178179
$scope.$root.runtime.cleanup()
179180
$scope.$root.debug_step = 0
180181
$scope.$root.debugger = true

stuff.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

subroutine.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
<div ng-switch-default>
6363
<ul class="unstyled"><li ng-repeat="source in node.get_node_sources()" class="source">
64-
<div class="value">{{runtime.scope.nodes[node.id].output_values[source.id]}}</div>
64+
<div class="value">{{debugger_scope.nodes[node.id].output_values[source.id]}}</div>
6565
<div nib="source" node="node"></div>
6666
{{source.text}}
6767
</li></ul>

0 commit comments

Comments
 (0)