[Engine-devel] How to debug in frontend project

Hi, How to debug the code in frontend project? I mean, print out some debug message from "onSave" method in the java file of "VmListModel.java" which is located in uicommonweb project. Thanks in advance. Best Regards, Dave Chen

Hi, Not sure this it what you've meant, but gwt allows you to debug directly from your IDE. Here is how: - compile using maven - go to: frontend/webadmin/modules/webadmin - run: mvn clean gwt:debug -Pgwt-admin,gwtdev (This will invoke a maven build which will get to the line: "[INFO] Listening for transport dt_socket at address: 8000") - Create a debug configuration on your IDE for remote debug on host:localhost port:8000 - Debug using the IDE (The IDE debug would launch a gwt tool which would allow you to activate the webadmin on you browser) * after activating the webadmin on the browser via the gwt tool, be patient - it takes few minutes to load. Ofri ----- Original Message -----
From: "Wei D Chen" <wei.d.chen@intel.com> To: engine-devel@ovirt.org Sent: Tuesday, February 26, 2013 11:00:57 AM Subject: [Engine-devel] How to debug in frontend project
Hi,
How to debug the code in frontend project? I mean, print out some debug message from "onSave" method in the java file of "VmListModel.java" which is located in uicommonweb project. Thanks in advance.
Best Regards, Dave Chen
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

Hi Ofri, Thanks for your reply. We follow the instructions, and we can see the similar information about the opened debug port, that is, " [INFO] Listening for transport dt_socket at address: 8000". My understanding is compiler is okay and the debug port is available. But, when I remote access to this host via Eclipse, the connection abort immediately. Some difference after compare with the instruction is, our IDE is installed on a windows OS and build env is on a linux OS, they are different physical machine, this shouldn't be the root cause in my opinion, remote debug from a remote server is make sense always. Any good suggestion? Thanks a lot! Here is some error message I get after the connection is aborted. [ERROR] [AppClassLoader@55a6c368] info AspectJ Weaver Version 1.6.11 built on Tuesday Mar 15, 2011 at 15:31:04 GMT [ERROR] [AppClassLoader@55a6c368] info register classloader sun.misc.Launcher$AppClassLoader@55a6c368 [ERROR] [AppClassLoader@55a6c368] info using configuration file:/home/ldq/.m2/repository/org/ovirt/engine/ui/gwt-extension/3.2.0/gwt-extension-3.2.0.jar!/META-INF/aop.xml [ERROR] [AppClassLoader@55a6c368] info using configuration file:/home/ldq/.m2/repository/org/ovirt/engine/ui/gwt-extension/3.2.0/gwt-extension-3.2.0-sources.jar!/META-INF/aop.xml [ERROR] [AppClassLoader@55a6c368] info register aspect org.ovirt.engine.ui.gwtextension.DontPrune [ERROR] [AppClassLoader@55a6c368] info register aspect org.ovirt.engine.ui.gwtextension.DontPrune [ERROR] -bindAddress host "0.0.0.0" unknown [ERROR] Google Web Toolkit 2.3.0 [ERROR] DevMode [-noserver] [-port port-number | "auto"] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logdir directory] [-logLevel level] [-gen dir] [-bindAddress host-name-or-address] [-codeServerPort port-number | "auto"] [-server servletContainerLauncher[:args]] [-startupUrl url] [-war dir] [-deploy dir] [-extra dir] [-workDir dir] module[s] [ERROR] [ERROR] where [ERROR] -noserver Prevents the embedded web server from running [ERROR] -port Specifies the TCP port for the embedded web server (defaults to 8888) [ERROR] -whitelist Allows the user to browse URLs that match the specified regexes (comma or space separated) [ERROR] -blacklist Prevents the user browsing URLs that match the specified regexes (comma or space separated) [ERROR] -logdir Logs to a file in the given directory, as well as graphically [ERROR] -logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL [ERROR] -gen Debugging: causes normally-transient generated types to be saved in the specified directory [ERROR] -bindAddress Specifies the bind address for the code server and web server (defaults to 127.0.0.1) [ERROR] -codeServerPort Specifies the TCP port for the code server (defaults to 9997) [ERROR] -server Specify a different embedded web server to run (must implement ServletContainerLauncher) [ERROR] -startupUrl Automatically launches the specified URL [ERROR] -war The directory into which deployable output files will be written (defaults to 'war') [ERROR] -deploy The directory into which deployable but not servable output files will be written (defaults to 'WEB-INF/deploy' under the -war directory/jar, and may be the same as the -extra directory/jar) [ERROR] -extra The directory into which extra files, not intended for deployment, will be written [ERROR] -workDir The compiler's working directory for internal use (must be writeable; defaults to a system temp dir) [ERROR] and [ERROR] module[s] Specifies the name(s) of the module(s) to host [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1:43.341s [INFO] Finished at: Wed Feb 27 13:44:31 CST 2013 [INFO] Final Memory: 38M/357M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:debug (default-cli) on project webadmin: Command [[ [ERROR] /bin/sh -c /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/bin/java -javaagent:/home/ldq/.m2/repository/org/aspectj/as... [ERROR] ]] failed with status 255 [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException Best Regards, Dave Chen
-----Original Message----- From: Ofri Masad [mailto:omasad@redhat.com] Sent: Tuesday, February 26, 2013 5:20 PM To: Chen, Wei D Cc: engine-devel@ovirt.org Subject: Re: [Engine-devel] How to debug in frontend project
Hi,
Not sure this it what you've meant, but gwt allows you to debug directly from your IDE. Here is how: - compile using maven - go to: frontend/webadmin/modules/webadmin - run: mvn clean gwt:debug -Pgwt-admin,gwtdev (This will invoke a maven build which will get to the line: "[INFO] Listening for transport dt_socket at address: 8000") - Create a debug configuration on your IDE for remote debug on host:localhost port:8000 - Debug using the IDE (The IDE debug would launch a gwt tool which would allow you to activate the webadmin on you browser)
* after activating the webadmin on the browser via the gwt tool, be patient - it takes few minutes to load.
Ofri
----- Original Message -----
From: "Wei D Chen" <wei.d.chen@intel.com> To: engine-devel@ovirt.org Sent: Tuesday, February 26, 2013 11:00:57 AM Subject: [Engine-devel] How to debug in frontend project
Hi,
How to debug the code in frontend project? I mean, print out some debug message from "onSave" method in the java file of "VmListModel.java" which is located in uicommonweb project. Thanks in advance.
Best Regards, Dave Chen
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

Hi, this is a wiki describing the debug of frontend: http://www.ovirt.org/DebugFrontend Please make sure that you have set up everything according to that wiki. thanks, Tomas ----- Original Message ----- From: "Wei D Chen" <wei.d.chen@intel.com> To: "Ofri Masad" <omasad@redhat.com> Cc: engine-devel@ovirt.org Sent: Wednesday, February 27, 2013 7:07:01 AM Subject: Re: [Engine-devel] How to debug in frontend project Hi Ofri, Thanks for your reply. We follow the instructions, and we can see the similar information about the opened debug port, that is, " [INFO] Listening for transport dt_socket at address: 8000". My understanding is compiler is okay and the debug port is available. But, when I remote access to this host via Eclipse, the connection abort immediately. Some difference after compare with the instruction is, our IDE is installed on a windows OS and build env is on a linux OS, they are different physical machine, this shouldn't be the root cause in my opinion, remote debug from a remote server is make sense always. Any good suggestion? Thanks a lot! Here is some error message I get after the connection is aborted. [ERROR] [AppClassLoader@55a6c368] info AspectJ Weaver Version 1.6.11 built on Tuesday Mar 15, 2011 at 15:31:04 GMT [ERROR] [AppClassLoader@55a6c368] info register classloader sun.misc.Launcher$AppClassLoader@55a6c368 [ERROR] [AppClassLoader@55a6c368] info using configuration file:/home/ldq/.m2/repository/org/ovirt/engine/ui/gwt-extension/3.2.0/gwt-extension-3.2.0.jar!/META-INF/aop.xml [ERROR] [AppClassLoader@55a6c368] info using configuration file:/home/ldq/.m2/repository/org/ovirt/engine/ui/gwt-extension/3.2.0/gwt-extension-3.2.0-sources.jar!/META-INF/aop.xml [ERROR] [AppClassLoader@55a6c368] info register aspect org.ovirt.engine.ui.gwtextension.DontPrune [ERROR] [AppClassLoader@55a6c368] info register aspect org.ovirt.engine.ui.gwtextension.DontPrune [ERROR] -bindAddress host "0.0.0.0" unknown [ERROR] Google Web Toolkit 2.3.0 [ERROR] DevMode [-noserver] [-port port-number | "auto"] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logdir directory] [-logLevel level] [-gen dir] [-bindAddress host-name-or-address] [-codeServerPort port-number | "auto"] [-server servletContainerLauncher[:args]] [-startupUrl url] [-war dir] [-deploy dir] [-extra dir] [-workDir dir] module[s] [ERROR] [ERROR] where [ERROR] -noserver Prevents the embedded web server from running [ERROR] -port Specifies the TCP port for the embedded web server (defaults to 8888) [ERROR] -whitelist Allows the user to browse URLs that match the specified regexes (comma or space separated) [ERROR] -blacklist Prevents the user browsing URLs that match the specified regexes (comma or space separated) [ERROR] -logdir Logs to a file in the given directory, as well as graphically [ERROR] -logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL [ERROR] -gen Debugging: causes normally-transient generated types to be saved in the specified directory [ERROR] -bindAddress Specifies the bind address for the code server and web server (defaults to 127.0.0.1) [ERROR] -codeServerPort Specifies the TCP port for the code server (defaults to 9997) [ERROR] -server Specify a different embedded web server to run (must implement ServletContainerLauncher) [ERROR] -startupUrl Automatically launches the specified URL [ERROR] -war The directory into which deployable output files will be written (defaults to 'war') [ERROR] -deploy The directory into which deployable but not servable output files will be written (defaults to 'WEB-INF/deploy' under the -war directory/jar, and may be the same as the -extra directory/jar) [ERROR] -extra The directory into which extra files, not intended for deployment, will be written [ERROR] -workDir The compiler's working directory for internal use (must be writeable; defaults to a system temp dir) [ERROR] and [ERROR] module[s] Specifies the name(s) of the module(s) to host [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1:43.341s [INFO] Finished at: Wed Feb 27 13:44:31 CST 2013 [INFO] Final Memory: 38M/357M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:debug (default-cli) on project webadmin: Command [[ [ERROR] /bin/sh -c /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/bin/java -javaagent:/home/ldq/.m2/repository/org/aspectj/as... [ERROR] ]] failed with status 255 [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException Best Regards, Dave Chen
-----Original Message----- From: Ofri Masad [mailto:omasad@redhat.com] Sent: Tuesday, February 26, 2013 5:20 PM To: Chen, Wei D Cc: engine-devel@ovirt.org Subject: Re: [Engine-devel] How to debug in frontend project
Hi,
Not sure this it what you've meant, but gwt allows you to debug directly from your IDE. Here is how: - compile using maven - go to: frontend/webadmin/modules/webadmin - run: mvn clean gwt:debug -Pgwt-admin,gwtdev (This will invoke a maven build which will get to the line: "[INFO] Listening for transport dt_socket at address: 8000") - Create a debug configuration on your IDE for remote debug on host:localhost port:8000 - Debug using the IDE (The IDE debug would launch a gwt tool which would allow you to activate the webadmin on you browser)
* after activating the webadmin on the browser via the gwt tool, be patient - it takes few minutes to load.
Ofri
----- Original Message -----
From: "Wei D Chen" <wei.d.chen@intel.com> To: engine-devel@ovirt.org Sent: Tuesday, February 26, 2013 11:00:57 AM Subject: [Engine-devel] How to debug in frontend project
Hi,
How to debug the code in frontend project? I mean, print out some debug message from "onSave" method in the java file of "VmListModel.java" which is located in uicommonweb project. Thanks in advance.
Best Regards, Dave Chen
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

Hi, Dave, please also read http://wiki.ovirt.org/DebugFrontend#Troubleshooting , I added some entries there, the second entry may solve your problem, I have seen that error a few days ago. ----- Original Message -----
From: "Tomas Jelinek" <tjelinek@redhat.com> To: "Wei D Chen" <wei.d.chen@intel.com> Cc: engine-devel@ovirt.org Sent: Wednesday, February 27, 2013 8:23:32 AM Subject: Re: [Engine-devel] How to debug in frontend project
Hi,
this is a wiki describing the debug of frontend: http://www.ovirt.org/DebugFrontend
Please make sure that you have set up everything according to that wiki.
thanks, Tomas
----- Original Message ----- From: "Wei D Chen" <wei.d.chen@intel.com> To: "Ofri Masad" <omasad@redhat.com> Cc: engine-devel@ovirt.org Sent: Wednesday, February 27, 2013 7:07:01 AM Subject: Re: [Engine-devel] How to debug in frontend project
Hi Ofri,
Thanks for your reply.
We follow the instructions, and we can see the similar information about the opened debug port, that is, " [INFO] Listening for transport dt_socket at address: 8000". My understanding is compiler is okay and the debug port is available. But, when I remote access to this host via Eclipse, the connection abort immediately. Some difference after compare with the instruction is, our IDE is installed on a windows OS and build env is on a linux OS, they are different physical machine, this shouldn't be the root cause in my opinion, remote debug from a remote server is make sense always. Any good suggestion? Thanks a lot!
Here is some error message I get after the connection is aborted.
[ERROR] [AppClassLoader@55a6c368] info AspectJ Weaver Version 1.6.11 built on Tuesday Mar 15, 2011 at 15:31:04 GMT [ERROR] [AppClassLoader@55a6c368] info register classloader sun.misc.Launcher$AppClassLoader@55a6c368 [ERROR] [AppClassLoader@55a6c368] info using configuration file:/home/ldq/.m2/repository/org/ovirt/engine/ui/gwt-extension/3.2.0/gwt-extension-3.2.0.jar!/META-INF/aop.xml [ERROR] [AppClassLoader@55a6c368] info using configuration file:/home/ldq/.m2/repository/org/ovirt/engine/ui/gwt-extension/3.2.0/gwt-extension-3.2.0-sources.jar!/META-INF/aop.xml [ERROR] [AppClassLoader@55a6c368] info register aspect org.ovirt.engine.ui.gwtextension.DontPrune [ERROR] [AppClassLoader@55a6c368] info register aspect org.ovirt.engine.ui.gwtextension.DontPrune [ERROR] -bindAddress host "0.0.0.0" unknown [ERROR] Google Web Toolkit 2.3.0 [ERROR] DevMode [-noserver] [-port port-number | "auto"] [-whitelist whitelist-string] [-blacklist blacklist-string] [-logdir directory] [-logLevel level] [-gen dir] [-bindAddress host-name-or-address] [-codeServerPort port-number | "auto"] [-server servletContainerLauncher[:args]] [-startupUrl url] [-war dir] [-deploy dir] [-extra dir] [-workDir dir] module[s] [ERROR] [ERROR] where [ERROR] -noserver Prevents the embedded web server from running [ERROR] -port Specifies the TCP port for the embedded web server (defaults to 8888) [ERROR] -whitelist Allows the user to browse URLs that match the specified regexes (comma or space separated) [ERROR] -blacklist Prevents the user browsing URLs that match the specified regexes (comma or space separated) [ERROR] -logdir Logs to a file in the given directory, as well as graphically [ERROR] -logLevel The level of logging detail: ERROR, WARN, INFO, TRACE, DEBUG, SPAM, or ALL [ERROR] -gen Debugging: causes normally-transient generated types to be saved in the specified directory [ERROR] -bindAddress Specifies the bind address for the code server and web server (defaults to 127.0.0.1) [ERROR] -codeServerPort Specifies the TCP port for the code server (defaults to 9997) [ERROR] -server Specify a different embedded web server to run (must implement ServletContainerLauncher) [ERROR] -startupUrl Automatically launches the specified URL [ERROR] -war The directory into which deployable output files will be written (defaults to 'war') [ERROR] -deploy The directory into which deployable but not servable output files will be written (defaults to 'WEB-INF/deploy' under the -war directory/jar, and may be the same as the -extra directory/jar) [ERROR] -extra The directory into which extra files, not intended for deployment, will be written [ERROR] -workDir The compiler's working directory for internal use (must be writeable; defaults to a system temp dir) [ERROR] and [ERROR] module[s] Specifies the name(s) of the module(s) to host [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1:43.341s [INFO] Finished at: Wed Feb 27 13:44:31 CST 2013 [INFO] Final Memory: 38M/357M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.3.0-1:debug (default-cli) on project webadmin: Command [[ [ERROR] /bin/sh -c /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9.x86_64/jre/bin/java -javaagent:/home/ldq/.m2/repository/org/aspectj/as...
[ERROR] ]] failed with status 255 [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Best Regards, Dave Chen
-----Original Message----- From: Ofri Masad [mailto:omasad@redhat.com] Sent: Tuesday, February 26, 2013 5:20 PM To: Chen, Wei D Cc: engine-devel@ovirt.org Subject: Re: [Engine-devel] How to debug in frontend project
Hi,
Not sure this it what you've meant, but gwt allows you to debug directly from your IDE. Here is how: - compile using maven - go to: frontend/webadmin/modules/webadmin - run: mvn clean gwt:debug -Pgwt-admin,gwtdev (This will invoke a maven build which will get to the line: "[INFO] Listening for transport dt_socket at address: 8000") - Create a debug configuration on your IDE for remote debug on host:localhost port:8000 - Debug using the IDE (The IDE debug would launch a gwt tool which would allow you to activate the webadmin on you browser)
* after activating the webadmin on the browser via the gwt tool, be patient - it takes few minutes to load.
Ofri
----- Original Message -----
From: "Wei D Chen" <wei.d.chen@intel.com> To: engine-devel@ovirt.org Sent: Tuesday, February 26, 2013 11:00:57 AM Subject: [Engine-devel] How to debug in frontend project
Hi,
How to debug the code in frontend project? I mean, print out some debug message from "onSave" method in the java file of "VmListModel.java" which is located in uicommonweb project. Thanks in advance.
Best Regards, Dave Chen
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

Hi, please find some details on debugging Web Admin below: 0) Make sure to export appropriate oVirt-related environment variables, for example: $ export OVIRT_GIT=$HOME/workspace/ovirt-engine $ export JBOSS_HOME=/usr/local/dev/ovirt-jboss-as $ export ENGINE_DEFAULTS=$OVIRT_GIT/backend/manager/conf/engine.conf.defaults 1) Perform full oVirt build, with Web Admin GWT compilation enabled $ cd $OVIRT_GIT $ mvn clean install -Pdep,gwt-admin -Dgwt.compiler.localWorkers=8 (Note: 'dep' profile deploys engine.ear to Engine JBoss instance, 'gwt-admin' profile enables Web Admin GWT compilation, 'gwt.compiler.localWorkers' is optional and should match the number of CPU cores to speed up GWT compilation) 2) Start Engine JBoss instance (standalone mode) $ cd $JBOSS_HOME/bin $ ./standalone.sh (Note: for server-side code debugging, you might want to edit '$JBOSS_HOME/bin/standalone.conf' and uncomment JPDA settings for remote socket debugging) 3) Launch Web Admin Development Mode session $ cd $OVIRT_GIT/frontend/webadmin/modules/webadmin $ mvn gwt:debug -Pgwtdev,gwt-admin -Dgwt.noserver=true 4) Connect to Web Admin Development Mode session from Java IDE
In Eclipse, create new 'Remote Java Application' debug configuration as follows: - host 'localhost', port 8000 - connection type 'Standard (Socket Attach)' - in 'Source' tab, you might want to add related frontend projects if you previously imported them into Eclipse (Add | Java project), e.g. 'uicommonweb' and 'gwt-common'
5) Launch Web Admin in web browser
open http://127.0.0.1:8700/webadmin/webadmin/WebAdmin.html?gwt.codesvr=127.0.0.1:... (first-time only) you will be prompted to install GWT Developer plugin for the given browser, proceed with installation and restart the browser open the URL again, GWT Developer plugin will now connect to Web Admin Development Mode ('gwt.codesvr') there will be a new tab in Development Mode GUI for the given browser, including client-side logs
(Note: each time you make a client-side code change, you have to refresh the URL in web browser, causing Web Admin to restart.) Regards, Vojtech ----- Original Message ----- From: "Ofri Masad" <omasad@redhat.com> To: "Wei D Chen" <wei.d.chen@intel.com> Cc: engine-devel@ovirt.org Sent: Tuesday, February 26, 2013 10:20:19 AM Subject: Re: [Engine-devel] How to debug in frontend project Hi, Not sure this it what you've meant, but gwt allows you to debug directly from your IDE. Here is how: - compile using maven - go to: frontend/webadmin/modules/webadmin - run: mvn clean gwt:debug -Pgwt-admin,gwtdev (This will invoke a maven build which will get to the line: "[INFO] Listening for transport dt_socket at address: 8000") - Create a debug configuration on your IDE for remote debug on host:localhost port:8000 - Debug using the IDE (The IDE debug would launch a gwt tool which would allow you to activate the webadmin on you browser) * after activating the webadmin on the browser via the gwt tool, be patient - it takes few minutes to load. Ofri ----- Original Message -----
From: "Wei D Chen" <wei.d.chen@intel.com> To: engine-devel@ovirt.org Sent: Tuesday, February 26, 2013 11:00:57 AM Subject: [Engine-devel] How to debug in frontend project
Hi,
How to debug the code in frontend project? I mean, print out some debug message from "onSave" method in the java file of "VmListModel.java" which is located in uicommonweb project. Thanks in advance.
Best Regards, Dave Chen
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

Hi guys, I rewrote [http://www.ovirt.org/DebugFrontend] to include all details on debugging Frontend applications, as well as some frequently asked questions. Regards, Vojtech ----- Original Message ----- From: "Vojtech Szocs" <vszocs@redhat.com> To: "Ofri Masad" <omasad@redhat.com>, "Wei D Chen" <wei.d.chen@intel.com> Cc: engine-devel@ovirt.org Sent: Monday, March 4, 2013 4:38:01 PM Subject: Re: [Engine-devel] How to debug in frontend project Hi, please find some details on debugging Web Admin below: 0) Make sure to export appropriate oVirt-related environment variables, for example: $ export OVIRT_GIT=$HOME/workspace/ovirt-engine $ export JBOSS_HOME=/usr/local/dev/ovirt-jboss-as $ export ENGINE_DEFAULTS=$OVIRT_GIT/backend/manager/conf/engine.conf.defaults 1) Perform full oVirt build, with Web Admin GWT compilation enabled $ cd $OVIRT_GIT $ mvn clean install -Pdep,gwt-admin -Dgwt.compiler.localWorkers=8 (Note: 'dep' profile deploys engine.ear to Engine JBoss instance, 'gwt-admin' profile enables Web Admin GWT compilation, 'gwt.compiler.localWorkers' is optional and should match the number of CPU cores to speed up GWT compilation) 2) Start Engine JBoss instance (standalone mode) $ cd $JBOSS_HOME/bin $ ./standalone.sh (Note: for server-side code debugging, you might want to edit '$JBOSS_HOME/bin/standalone.conf' and uncomment JPDA settings for remote socket debugging) 3) Launch Web Admin Development Mode session $ cd $OVIRT_GIT/frontend/webadmin/modules/webadmin $ mvn gwt:debug -Pgwtdev,gwt-admin -Dgwt.noserver=true 4) Connect to Web Admin Development Mode session from Java IDE
In Eclipse, create new 'Remote Java Application' debug configuration as follows: - host 'localhost', port 8000 - connection type 'Standard (Socket Attach)' - in 'Source' tab, you might want to add related frontend projects if you previously imported them into Eclipse (Add | Java project), e.g. 'uicommonweb' and 'gwt-common'
5) Launch Web Admin in web browser
open http://127.0.0.1:8700/webadmin/webadmin/WebAdmin.html?gwt.codesvr=127.0.0.1:... (first-time only) you will be prompted to install GWT Developer plugin for the given browser, proceed with installation and restart the browser open the URL again, GWT Developer plugin will now connect to Web Admin Development Mode ('gwt.codesvr') there will be a new tab in Development Mode GUI for the given browser, including client-side logs
(Note: each time you make a client-side code change, you have to refresh the URL in web browser, causing Web Admin to restart.) Regards, Vojtech ----- Original Message ----- From: "Ofri Masad" <omasad@redhat.com> To: "Wei D Chen" <wei.d.chen@intel.com> Cc: engine-devel@ovirt.org Sent: Tuesday, February 26, 2013 10:20:19 AM Subject: Re: [Engine-devel] How to debug in frontend project Hi, Not sure this it what you've meant, but gwt allows you to debug directly from your IDE. Here is how: - compile using maven - go to: frontend/webadmin/modules/webadmin - run: mvn clean gwt:debug -Pgwt-admin,gwtdev (This will invoke a maven build which will get to the line: "[INFO] Listening for transport dt_socket at address: 8000") - Create a debug configuration on your IDE for remote debug on host:localhost port:8000 - Debug using the IDE (The IDE debug would launch a gwt tool which would allow you to activate the webadmin on you browser) * after activating the webadmin on the browser via the gwt tool, be patient - it takes few minutes to load. Ofri ----- Original Message -----
From: "Wei D Chen" <wei.d.chen@intel.com> To: engine-devel@ovirt.org Sent: Tuesday, February 26, 2013 11:00:57 AM Subject: [Engine-devel] How to debug in frontend project
Hi,
How to debug the code in frontend project? I mean, print out some debug message from "onSave" method in the java file of "VmListModel.java" which is located in uicommonweb project. Thanks in advance.
Best Regards, Dave Chen
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
participants (5)
-
Chen, Wei D
-
Laszlo Hornyak
-
Ofri Masad
-
Tomas Jelinek
-
Vojtech Szocs