Skip to content

Working Debugger with Variable Inspector - Final PR #711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mode/src/processing/mode/android/AndroidDebugger.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ public synchronized void startDebug(AndroidRunner runner, Device device) {

inspector.reset();

// make the inspector instance visible on which tree nodes would be reflected
inspector.setVisible(true);

runtime = runner;
pkgName = runner.build.getPackageName();
sketchClassName = runner.build.getSketchClassName();
Expand Down
2 changes: 2 additions & 0 deletions mode/src/processing/mode/android/AndroidEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ public AndroidDebugger getDebugger() {
@Override
public void toggleDebug() {
super.toggleDebug();
// make the unused inspector invisible
super.debugger.dispose();
debugger.toggleDebug();
}

Expand Down
9 changes: 4 additions & 5 deletions mode/src/processing/mode/android/AndroidToolbar.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ static public String getTitle(int index) {
@Override
public List<EditorButton> createButtons() {
// aEditor not ready yet because this is called by super()
// final boolean debug = ((AndroidEditor) editor).isDebuggerEnabled();
final boolean debug = false;
final boolean debug = ((AndroidEditor) editor).isDebuggerEnabled();
// final boolean debug = false;


ArrayList<EditorButton> toReturn = new ArrayList<EditorButton>();
Expand Down Expand Up @@ -150,7 +150,7 @@ private void handleStep(int modifiers) {

@Override
public void addModeButtons(Box box, JLabel label) {
/*

EditorButton debugButton =
new EditorButton(this, "/lib/toolbar/debug",
Language.text("toolbar.debug")) {
Expand All @@ -166,7 +166,7 @@ public void actionPerformed(ActionEvent e) {
// debugButton.setRolloverLabel(label);
box.add(debugButton);
addGap(box);
*/

}

@Override
Expand Down Expand Up @@ -216,4 +216,3 @@ public void deactivateStep() {
repaint();
}
}