Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366477 - initial debug contribution
Summary: initial debug contribution
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.4 M2   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-12 23:11 EST by Grant Gayed CLA
Modified: 2012-02-06 11:51 EST (History)
3 users (show)

See Also:


Attachments
Debug screenshot (51.36 KB, image/png)
2012-02-06 11:36 EST, Tomasz Zarna CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2011-12-12 23:11:14 EST
I've pushed the initial debug contribution to a GitHub repo that is forked from eclipse/orion.client, and have initiated a Pull request for it: https://github.com/eclipse/orion.client/pull/8 .
Comment 1 Simon Kaegi CLA 2011-12-14 16:26:40 EST
Thanks Grant -- I've pushed this now but have not enabled anything by default

Could you add some details in this bug describing how to use it and then mark this fixed.
Comment 2 John J. Barton CLA 2011-12-14 17:24:00 EST
I wonder if you might consider separating the communications and UI parts of this code?  I am working on a chrome.extension.debugger based communications extension which could plugin to the UI part here in principle.
Comment 3 Grant Gayed CLA 2011-12-16 12:01:08 EST
re: comment 2

What's released here demonstrates the basic functionality of connecting and evaluating JS, but there's certainly opportunity to investigate what you suggest.  I assume you're referring to crx2app.  I'll have a look at it soon (possibly with Simon) and we can follow up on orion-dev.


Steps for using the currently-released work:

1. Retrieve the latest org.eclipse.orion.client content, the debug page is in its bundles/org.eclipse.orion.client.debug folder.

2. Install its contained Chrome extension.  To do this (must be running Chrome):
  - locate the extension in the navigator: org.eclipse.orion.client.debug/chromeExtension/bin/debugChromeExtension.crx
  - copy its url, but don't click on it, since you don't want to edit it
  - navigate to the url of the resource itself by starting with the url you just copied and remove its middle "edit/edit.html#/" portion (will look like "http://orion.eclipse.org/file/...<snip>.../debugChromeExtension.crx")
  - click Install when prompted

3. Self-host
  - create a self-hosting site, add a folder mapping like /org.eclipse.orion.client/bundles/org.eclipse.orion.client.debug/web = /debug, and start it

4. In the self-hosted site go to the Plugins page and install the plugin, it will be at a url like http://self-host.orion.eclipse.org/debug/debugPlugin.html.
  - this creates a "Debug" global command up at the top-right corner (a Refresh may be needed)

5. Launch the debuggee (must be Chrome) with the following command-line switches:
  - --remote-debugging-port=<aValidPortNumber>
  - --user-data-dir=<theFullPathToAnArbitraryLocationToWriteProfileInfo>

6. Connect to the debuggee with the Debug page's Connect action
  - supply the debuggee's port number, and the debugger will show a table containing each of the debuggee's open tabs, and actions that can be performed on each

The next step is to replace the current "Evaluate..." action with a console.
Comment 4 Tomasz Zarna CLA 2012-02-06 11:36:10 EST
Created attachment 210600 [details]
Debug screenshot

(In reply to comment #3)
> Steps for using the currently-released work:

I went through the steps and I'm impressed. The remote debugging is pretty cool...

> The next step is to replace the current "Evaluate..." action with a console.

... I have one question though. Is the "Evaluate" action already gone? I assume the ">" prompt is from the console, isn't it?
Comment 5 Grant Gayed CLA 2012-02-06 11:51:53 EST
Yes, the console is the replacement, it went in in a subsequent contribution.