fa239825b7faacbe2066cd431ded2ef6b0ff192b
java/com.sap.sailing.gwt.ui/Debug SailingGWT SDM on Android.launch.template
| ... | ... | @@ -0,0 +1,15 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|
| 2 | +<launchConfiguration type="com.github.sdbg.debug.core.chromeMobileConnLaunchConfig"> |
|
| 3 | +<stringAttribute key="applicationName" value=""/> |
|
| 4 | +<stringAttribute key="device" value="<YOUR-DEVICE>"/> |
|
| 5 | +<booleanAttribute key="launchFile" value="false"/> |
|
| 6 | +<booleanAttribute key="launchTabWithUrl" value="true"/> |
|
| 7 | +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> |
|
| 8 | +<listEntry value="/com.sap.sailing.gwt.ui"/> |
|
| 9 | +</listAttribute> |
|
| 10 | +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> |
|
| 11 | +<listEntry value="4"/> |
|
| 12 | +</listAttribute> |
|
| 13 | +<stringAttribute key="projectName" value="com.sap.sailing.gwt.ui"/> |
|
| 14 | +<stringAttribute key="url" value="http://localhost:8888/gwt/Home.html"/> |
|
| 15 | +</launchConfiguration> |
java/com.sap.sailing.gwt.ui/Forward SailingGWT Ports for Android.launch.template
| ... | ... | @@ -0,0 +1,6 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|
| 2 | +<launchConfiguration type="com.github.sdbg.debug.core.androidReverseForwardsLaunchConfig"> |
|
| 3 | +<stringAttribute key="device" value="<YOUR-DEVICE>"/> |
|
| 4 | +<intAttribute key="deviceCommandPort" value="6565"/> |
|
| 5 | +<stringAttribute key="reverseForwards" value="localhost:8888:8888,localhost:9876:9876,localhost:9875:9875"/> |
|
| 6 | +</launchConfiguration> |
wiki/super-dev-mode.md
| ... | ... | @@ -57,3 +57,56 @@ Be aware that some of the Eclipse debugger features do NOT work with this kind o |
| 57 | 57 | * Variable naming is not 1:1 what you expect in the Java world |
| 58 | 58 | * Stacks look different but clicking on Stack elements should |
| 59 | 59 | * [[Stack Traces logged in Chrome do not use source maps|https://code.google.com/p/chromium/issues/detail?id=357958]], so you see the JavaScript Stack Trace instead. |
| 60 | + |
|
| 61 | +## Debugging SDM on Android devices |
|
| 62 | + |
|
| 63 | +### Requirements |
|
| 64 | + |
|
| 65 | +To enable [[https://developer.chrome.com/devtools/docs/remote-debugging|remote debugging for your Android device]] do the following steps: |
|
| 66 | + |
|
| 67 | +* Go to the System settings |
|
| 68 | +* If you do not see the "Developer options" menu, go to "About the device" and tap multiple times on "Build number" until a message appears |
|
| 69 | +* Go to the "Developer options" menu |
|
| 70 | +* Activate "USB debugging" |
|
| 71 | +* A notification apears in the system notification center while USB-debugging is turned on |
|
| 72 | + |
|
| 73 | +Other requirements: |
|
| 74 | + |
|
| 75 | +* You need Android 4.0+ to make remote debugging work |
|
| 76 | +* You need a recent version of Chrome installed on both, the Android device and your development system |
|
| 77 | + |
|
| 78 | +To be able to discover your Chrome browser running on the Android device from your development system you need to do the following: |
|
| 79 | + |
|
| 80 | +* Connect your device with USB-debugging turned on to your development system |
|
| 81 | +* Open Chrome on the Android device |
|
| 82 | + |
|
| 83 | +### Debugging via Desktop Chrome |
|
| 84 | + |
|
| 85 | +Do the following to start a debugging session via Chrome installed on your development system: |
|
| 86 | + |
|
| 87 | +* Open Chrome on your development system and navigate to [[chrome://inspect/#devices]] |
|
| 88 | +* Only the first time you need to configure the needed ports: |
|
| 89 | + * Check "Discover USB Devices |
|
| 90 | + * Click the button "Port forwarding ..." |
|
| 91 | + * Add an Entry for Port "8888" for address "localhost:8888" |
|
| 92 | + * Add an Entry for Port "9876" for address "localhost:9876" |
|
| 93 | + * Close the dialog |
|
| 94 | +* Enter the URL (e.g. [[http://localhost:8888/gwt/Home.html]]) nearby the connected Chrome browser of your device and press open |
|
| 95 | +* The specified URL will be opended in a new tab on your android device |
|
| 96 | +* A new window with an instance of the developer tools will appear on the development system |
|
| 97 | + * If it doesn't open automatically press "inspect" for the browser tab |
|
| 98 | +* You can now go to "Sources" and debug the source-mapped JS source as it is a local browser tab |
|
| 99 | + |
|
| 100 | +### Debugging via SDBG |
|
| 101 | + |
|
| 102 | +To debug SDM on your Android Chrome via SDBG do the following: |
|
| 103 | + |
|
| 104 | +* Get to know your Device ID |
|
| 105 | + * Navigate to [[chrome://inspect/#devices]] using your desktop Chrome while the device is connected with USB-Debugging turned on |
|
| 106 | + * The Device ID is shown next to the device name |
|
| 107 | + * Take the Device ID without the prefixed "#" |
|
| 108 | +* Copy the launch configuration templates "Debug SailingGWT SDM on Android.launch.template" and "Forward SailingGWT Ports for Android.launch.template" as *.launch files |
|
| 109 | +* Replace <YOUR-DEVICE> with your concrete Device ID |
|
| 110 | +* Launch "Forward SailingGWT Ports for Android.launch" |
|
| 111 | +* Launch "Debug SailingGWT SDM on Android.launch" |
|
| 112 | +* You should now be able to debug in Eclipse as described above |