Closed Bug 1134166 Opened 9 years ago Closed 9 years ago

The Inspector is useless after killing the application

Categories

(DevTools Graveyard :: WebIDE, defect, P3)

x86_64
Linux
defect

Tracking

(firefox40 fixed)

RESOLVED FIXED
Firefox 40
Tracking Status
firefox40 --- fixed

People

(Reporter: julienw, Assigned: jryans)

References

Details

(Whiteboard: [polish-backlog][difficulty=easy])

Attachments

(2 files)

STR:

1. Open WebIDE
2. Plug in your Flame and open it from the top right menu
3. Open the Messages app from the top left menu (you need the "debug certified apps" pref)
4. Kill the Messages app from command line:

  adb shell kill `adb shell b2g-ps Messages | awk '!/APPLICATION/ { print $4 }'`

=> Notice that the "play" icon is now displayed in WebIDE, instead of the "reload" icon. That means the WebIDE is correctly notified that the application has stopped.
=> You can still use the Tools. This is OK.

5. Start the application again (either from WebIDE or from the device)

=> Notice the Tools are displayed but interacting with them does nothing on the device.

You need to close/reopen them.
I *think* this is another toolbox shutdown bug which is fixed by
Depends on: 1128027
Okay, bug 1128027 changed some error messages here, but the issue itself still exists.

Julien, after step 4 (killing the app), you say "You can still use the Tools. This is OK.", but for me the toolbox seems pretty dead.  After all, we just killed the app, so how can the toolbox work anymore?

To me, the logical fix is for WebIDE's toolbox to close when the app is killed.  Does this seem right to you?
Flags: needinfo?(felash)
> "You can still use the Tools. This is OK."

Mmm I think I meant that this was not necessarily bad. For example, we might want to still see the console messages or the profiler information.

I don't have a strong opinion, but if we can keep the state as it is, and "just" reconnect the existing toolbox to any application we want to debug, while retaining all existing data, it would be the best behavior IMO.

If this is too difficult then do as you think :)
Flags: needinfo?(felash)
Actually, now that I use it once again, I exactly know how I'd like it to behave.

The fact is that I push the application using the Gaia build system, not using WebIDE (mainly because it's a shell command I can bind it in vim). So it kills the running application, and then I start it again, either from WebIDE or from the phone. And then I'd like WebIDE to automatically connect to the newly running application, but only when I start it (and I know WebIDE is aware of this because the top icons are changing).

Hope this makes sense.
(In reply to Julien Wajsberg [:julienw] (PTO April 6th) from comment #5)
> Actually, now that I use it once again, I exactly know how I'd like it to
> behave.
> 
> The fact is that I push the application using the Gaia build system, not
> using WebIDE (mainly because it's a shell command I can bind it in vim). So
> it kills the running application, and then I start it again, either from
> WebIDE or from the phone. And then I'd like WebIDE to automatically connect
> to the newly running application, but only when I start it (and I know
> WebIDE is aware of this because the top icons are changing).
> 
> Hope this makes sense.

Right, that makes sense!  If an app starts, and it's the currently selected app in WebIDE, we should auto-open the toolbox.
Whiteboard: [devedition-40]
While working on this issue, I noticed troubles with reopen the toolbox for the same app.  The patches in bug 1145049 resolve this, hopefully they will land soon.
Depends on: 1145049
Assignee: nobody → jryans
Status: NEW → ASSIGNED
For this to work as smoothly as possible, you should also have the patches from bug 1145049 applied.
Comment on attachment 8588858 [details] [diff] [review]
0001-Bug-1134166-Restart-toolbox-if-selected-app-re-opens.patch

Review of attachment 8588858 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good,
Attachment #8588858 - Flags: review?(poirot.alex) → review+
Comment on attachment 8588859 [details] [diff] [review]
0002-Bug-1134166-Close-toolbox-if-selected-app-dies.-r-oc.patch

Review of attachment 8588859 [details] [diff] [review]:
-----------------------------------------------------------------

thanks!
Attachment #8588859 - Flags: review?(poirot.alex) → review+
Note that I'm seeing the following exception, not sure it is related to your patch or one of mine:

Full message: TypeError: AppManager.selectedProject is null
Full stack: UI.updateToolboxFullscreenState@chrome://webide/content/webide.js:1058:1
UI._closeToolboxUI@chrome://webide/content/webide.js:1082:5
UI.destroyToolbox/<@chrome://webide/content/webide.js:1012:21

STR is to open simulator, connect to clock, open toolbox and shutdown the simulator.
(In reply to Alexandre Poirot [:ochameau] from comment #14)
> Note that I'm seeing the following exception, not sure it is related to your
> patch or one of mine:
> 
> Full message: TypeError: AppManager.selectedProject is null
> Full stack:
> UI.updateToolboxFullscreenState@chrome://webide/content/webide.js:1058:1
> UI._closeToolboxUI@chrome://webide/content/webide.js:1082:5
> UI.destroyToolbox/<@chrome://webide/content/webide.js:1012:21
> 
> STR is to open simulator, connect to clock, open toolbox and shutdown the
> simulator.

It happens on fx-team, but I'll throw in an extra check here to fix it.
Whiteboard: [devedition-40] → [devedition-40][difficulty=easy]
Priority: -- → P3
Whiteboard: [devedition-40][difficulty=easy] → [polish-backlog][difficulty=easy]
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: