f4e6a3488a866018db5bb70ba192f49190adaa70
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/Debug SailingGWT SDM on Chrome.launch
| ... | ... | @@ -0,0 +1,16 @@ |
| 1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
|
| 2 | +<launchConfiguration type="com.github.sdbg.debug.core.chromeLaunchConfig"> |
|
| 3 | +<stringAttribute key="applicationArguments" value=""/> |
|
| 4 | +<stringAttribute key="applicationName" value=""/> |
|
| 5 | +<booleanAttribute key="launchFile" value="false"/> |
|
| 6 | +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> |
|
| 7 | +<listEntry value="/com.sap.sailing.gwt.ui"/> |
|
| 8 | +</listAttribute> |
|
| 9 | +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> |
|
| 10 | +<listEntry value="4"/> |
|
| 11 | +</listAttribute> |
|
| 12 | +<stringAttribute key="projectName" value="com.sap.sailing.gwt.ui"/> |
|
| 13 | +<booleanAttribute key="showLaunchOutput" value="false"/> |
|
| 14 | +<stringAttribute key="url" value="http://127.0.0.1:8888/gwt/Home.html"/> |
|
| 15 | +<stringAttribute key="urlQueryParams" value=""/> |
|
| 16 | +</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> |
java/com.sap.sailing.gwt.ui/SailingGWT sdm.launch
| ... | ... | @@ -68,7 +68,7 @@ |
| 68 | 68 | <booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="false"/>
|
| 69 | 69 | <stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
|
| 70 | 70 | <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="com.google.gwt.dev.DevMode"/>
|
| 71 | -<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-superDevMode -incremental -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9997 -startupUrl /gwt/Home.html com.sap.sailing.gwt.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/PolarSheets.html com.sap.sailing.gwt.ui.PolarSheets -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.ui.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.ui.YoutubePopup com.sap.sailing.gwt.ui.RaceBoard com.sap.sailing.gwt.Home com.sap.sailing.gwt.ui.DataMining com.sap.sailing.gwt.ui.LeaderboardEditing com.sap.sailing.gwt.ui.AdminConsole com.sap.sailing.gwt.ui.Spectator com.sap.sailing.gwt.ui.RegattaOverview com.sap.sailing.gwt.ui.PolarSheets com.sap.sailing.gwt.ui.Leaderboard com.sap.sailing.gwt.ui.Simulator"/>
|
|
| 71 | +<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-superDevMode -incremental -war "${project_loc:com.sap.sailing.gwt.ui}" -noserver -remoteUI "${gwt_remote_ui_server_port}:${unique_id}" -logLevel INFO -codeServerPort 9997 -startupUrl /gwt/Home.html com.sap.sailing.gwt.Home -startupUrl /gwt/AdminConsole.html com.sap.sailing.gwt.ui.AdminConsole -startupUrl /gwt/LeaderboardEditing.html com.sap.sailing.gwt.ui.LeaderboardEditing -startupUrl /gwt/Leaderboard.html com.sap.sailing.gwt.ui.Leaderboard -startupUrl /gwt/Spectator.html com.sap.sailing.gwt.ui.Spectator -startupUrl /gwt/RaceBoard.html com.sap.sailing.gwt.ui.RaceBoard -startupUrl /gwt/PolarSheets.html com.sap.sailing.gwt.ui.PolarSheets -startupUrl /gwt/RegattaOverview.html com.sap.sailing.gwt.ui.RegattaOverview -startupUrl /gwt/DataMining.html com.sap.sailing.gwt.ui.DataMining -startupUrl /gwt/Simulator.html com.sap.sailing.gwt.ui.Simulator -startupUrl /gwt/VideoPopup.html com.sap.sailing.gwt.ui.VideoPopup com.sap.sailing.gwt.AutoPlay com.sap.sailing.gwt.ui.YoutubePopup"/>
|
|
| 72 | 72 | <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="com.sap.sailing.gwt.ui"/>
|
| 73 | 73 | <stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xms1024m -Xmx3072m"/>
|
| 74 | 74 | </launchConfiguration>
|
java/com.sap.sailing.www/WEB-INF/web.xml
| ... | ... | @@ -1,6 +1,17 @@ |
| 1 | -<?xml version="1.0" encoding="utf-8"?>
|
|
| 2 | -<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
| 3 | - xmlns="http://java.sun.com/xml/ns/javaee"
|
|
| 4 | - xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
|
|
| 5 | - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5">
|
|
| 6 | -</web-app>
|
|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
|
| 2 | +<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
| 3 | + xmlns="http://java.sun.com/xml/ns/javaee" |
|
| 4 | + xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" |
|
| 5 | + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> |
|
| 6 | + |
|
| 7 | + <servlet> |
|
| 8 | + <servlet-name>default</servlet-name> |
|
| 9 | + <servlet-class>org.eclipse.jetty.servlet.DefaultServlet |
|
| 10 | + </servlet-class> |
|
| 11 | + <init-param> |
|
| 12 | + <param-name>useFileMappedBuffer</param-name> |
|
| 13 | + <param-value>false</param-value> |
|
| 14 | + </init-param> |
|
| 15 | + </servlet> |
|
| 16 | + |
|
| 17 | +</web-app> |
java/com.sap.sse.security.ui/Security UI sdm.launch
| ... | ... | @@ -3,9 +3,10 @@ |
| 3 | 3 | <booleanAttribute key="com.google.gdt.eclipse.core.RUN_SERVER" value="false"/> |
| 4 | 4 | <stringAttribute key="com.google.gdt.eclipse.suiteMainTypeProcessor.PREVIOUSLY_SET_MAIN_TYPE_NAME" value="com.google.gwt.dev.GWTShell"/> |
| 5 | 5 | <booleanAttribute key="com.google.gdt.eclipse.suiteWarArgumentProcessor.IS_WAR_FROM_PROJECT_PROPERTIES" value="true"/> |
| 6 | +<stringAttribute key="com.google.gwt.eclipse.core.CODE_SERVER_PORT" value="9875"/> |
|
| 6 | 7 | <listAttribute key="com.google.gwt.eclipse.core.ENTRY_POINT_MODULES"> |
| 7 | -<listEntry value="com.sap.sse.security.ui.Login"/> |
|
| 8 | 8 | <listEntry value="com.sap.sse.security.ui.EditProfile"/> |
| 9 | +<listEntry value="com.sap.sse.security.ui.Login"/> |
|
| 9 | 10 | <listEntry value="com.sap.sse.security.ui.EmailValidation"/> |
| 10 | 11 | </listAttribute> |
| 11 | 12 | <booleanAttribute key="com.google.gwt.eclipse.core.SUPERDEVMODE_ENABLED" value="true"/> |
java/com.sap.sse.security.ui/WEB-INF/web.xml
| ... | ... | @@ -3,6 +3,16 @@ |
| 3 | 3 | xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" |
| 4 | 4 | xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" |
| 5 | 5 | version="2.5"> |
| 6 | + |
|
| 7 | + <servlet> |
|
| 8 | + <servlet-name>default</servlet-name> |
|
| 9 | + <servlet-class>org.eclipse.jetty.servlet.DefaultServlet |
|
| 10 | + </servlet-class> |
|
| 11 | + <init-param> |
|
| 12 | + <param-name>useFileMappedBuffer</param-name> |
|
| 13 | + <param-value>false</param-value> |
|
| 14 | + </init-param> |
|
| 15 | + </servlet> |
|
| 6 | 16 | |
| 7 | 17 | <!-- Disable directory listing: --> |
| 8 | 18 | <servlet> |
wiki/super-dev-mode.md
| ... | ... | @@ -19,6 +19,8 @@ You can add "GWT.debugger();" statements to your Java code. |
| 19 | 19 | This will force the JavaScript debugger to stop at this statement. |
| 20 | 20 | So you don't have to manually open the file in the dev tools and set a break point. |
| 21 | 21 | |
| 22 | +In addition, there's a composite launch configuration "SailingGWT All SDM.launch" that will start SDM for the SailingGWT modules as well as the Security UI modules. |
|
| 23 | + |
|
| 22 | 24 | ## Using Eclipse debugger for GWT SuperDevMode |
| 23 | 25 | |
| 24 | 26 | Debugging Java Code in the browser is very inconvenient (e.g. you have to manually open the files you already opened in Eclipse). |
| ... | ... | @@ -29,16 +31,12 @@ Using Using Eclipse debugger for GWT SuperDevMode [[SDBG|http://sdbg.github.io/] |
| 29 | 31 | To start SDM debugging in Eclipse, do the following: |
| 30 | 32 | |
| 31 | 33 | * Start the backend as you would always do. |
| 32 | -* Start GWT Super Dev Mode by launching "SailingGWT sdm.launch". |
|
| 34 | +* Start GWT Super Dev Mode by launching "SailingGWT sdm.launch" or "SailingGWT All SDM.launch". |
|
| 33 | 35 | * Do not Click on the URLs provided in "Development view"! |
| 34 | -* Copy one of the URLs instead |
|
| 35 | -* Go to Run -> Run Configurations ... |
|
| 36 | -* Create a new configuration of type "Launch Chrome" |
|
| 37 | -* Paste the URL and select the UI project you launched SDM for |
|
| 38 | -* Save and run => A new instance of Chrome is started and you will see a debug session running in Eclipse |
|
| 36 | +* Run "Debug SailingGWT SDM on Chrome.launch" |
|
| 37 | +* A new instance of Chrome is started and you will see a debug session running in Eclipse |
|
| 39 | 38 | * Your Eclipse break points will now work in the running debug session. |
| 40 | - |
|
| 41 | -The created and save run configuration can be used for subsequent launches. |
|
| 39 | +* You are free to change the URL or navigate to other pages in the automatically openend browser window (debugging will go on) |
|
| 42 | 40 | |
| 43 | 41 | ### Noteworthy information & Troubleshooting |
| 44 | 42 | |
| ... | ... | @@ -57,3 +55,56 @@ Be aware that some of the Eclipse debugger features do NOT work with this kind o |
| 57 | 55 | * Variable naming is not 1:1 what you expect in the Java world |
| 58 | 56 | * Stacks look different but clicking on Stack elements should |
| 59 | 57 | * [[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. |
| 58 | + |
|
| 59 | +## Debugging SDM on Android devices |
|
| 60 | + |
|
| 61 | +### Requirements |
|
| 62 | + |
|
| 63 | +To enable [[https://developer.chrome.com/devtools/docs/remote-debugging|remote debugging for your Android device]] do the following steps: |
|
| 64 | + |
|
| 65 | +* Go to the System settings |
|
| 66 | +* 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 |
|
| 67 | +* Go to the "Developer options" menu |
|
| 68 | +* Activate "USB debugging" |
|
| 69 | +* A notification apears in the system notification center while USB-debugging is turned on |
|
| 70 | + |
|
| 71 | +Other requirements: |
|
| 72 | + |
|
| 73 | +* You need Android 4.0+ to make remote debugging work |
|
| 74 | +* You need a recent version of Chrome installed on both, the Android device and your development system |
|
| 75 | + |
|
| 76 | +To be able to discover your Chrome browser running on the Android device from your development system you need to do the following: |
|
| 77 | + |
|
| 78 | +* Connect your device with USB-debugging turned on to your development system |
|
| 79 | +* Open Chrome on the Android device |
|
| 80 | + |
|
| 81 | +### Debugging via Desktop Chrome |
|
| 82 | + |
|
| 83 | +Do the following to start a debugging session via Chrome installed on your development system: |
|
| 84 | + |
|
| 85 | +* Open Chrome on your development system and navigate to [[chrome://inspect/#devices]] |
|
| 86 | +* Only the first time you need to configure the needed ports: |
|
| 87 | + * Check "Discover USB Devices |
|
| 88 | + * Click the button "Port forwarding ..." |
|
| 89 | + * Add an Entry for Port "8888" for address "localhost:8888" |
|
| 90 | + * Add an Entry for Port "9876" for address "localhost:9876" |
|
| 91 | + * Close the dialog |
|
| 92 | +* Enter the URL (e.g. [[http://localhost:8888/gwt/Home.html]]) nearby the connected Chrome browser of your device and press open |
|
| 93 | +* The specified URL will be opended in a new tab on your android device |
|
| 94 | +* A new window with an instance of the developer tools will appear on the development system |
|
| 95 | + * If it doesn't open automatically press "inspect" for the browser tab |
|
| 96 | +* You can now go to "Sources" and debug the source-mapped JS source as it is a local browser tab |
|
| 97 | + |
|
| 98 | +### Debugging via SDBG |
|
| 99 | + |
|
| 100 | +To debug SDM on your Android Chrome via SDBG do the following: |
|
| 101 | + |
|
| 102 | +* Get to know your Device ID |
|
| 103 | + * Navigate to [[chrome://inspect/#devices]] using your desktop Chrome while the device is connected with USB-Debugging turned on |
|
| 104 | + * The Device ID is shown next to the device name |
|
| 105 | + * Take the Device ID without the prefixed "#" |
|
| 106 | +* Copy the launch configuration templates "Debug SailingGWT SDM on Android.launch.template" and "Forward SailingGWT Ports for Android.launch.template" as *.launch files |
|
| 107 | +* Replace <YOUR-DEVICE> with your concrete Device ID |
|
| 108 | +* Launch "Forward SailingGWT Ports for Android.launch" |
|
| 109 | +* Launch "Debug SailingGWT SDM on Android.launch" |
|
| 110 | +* You should now be able to debug in Eclipse as described above |