[Engine-devel] if there is a updated debug environment how to?
Vojtech Szocs
vszocs at redhat.com
Tue Jun 18 11:01:01 UTC 2013
Hi Alon,
revisiting this thread, I have some comments regarding GWT debugging via standard development environment, as described in README.developer.
- README.developer says:
For example, if your machine is low on memory, use: EXTRA_BUILD_FLAGS_DEV="-Dgwt-plugin.localWorkers=2"
however this should be:
For example, if your machine is low on memory, use: EXTRA_BUILD_FLAGS_DEV="-Dgwt.compiler.localWorkers=2"
- README.developer says:
By default, only the gecko1_8 support is built
I'd rather explain what this means:
By default, only the gecko1_8 (Mozilla Firefox) support is built
- what's the point of having EXTRA_BUILD_FLAGS_DEV_GWT vs. EXTRA_BUILD_FLAGS_DEV ?
if EXTRA_BUILD_FLAGS_DEV_GWT is meant to control target browser(s) then it should be renamed appropriately
if EXTRA_BUILD_FLAGS_DEV_GWT is meant to group all GWT-specific flags, README.developer shouldn't advise to do EXTRA_BUILD_FLAGS_DEV="-Dgwt..."
- Makefile gwt-debug target looks OK to me
> What I do expect is that the debugger not to require a specific relation with
> specific application (Webadmin, userportal).
gwt-maven-plugin must be invoked in context of a specific Maven module representing GWT application you want to debug. In other words, you need to start GWT Development Mode for specific application module. This is why you need to "cd" to specific directory (webadmin/userportal-gwtp) before invoking "mvn ... gwt:debug" command.
You cannot start GWT Development Mode in a generic (application-agnostic) way and *then* connect to it from browser and Java IDE, this is not how GWT Development Mode is meant to be used. JBoss remote socket debugging and GWT application debugging are two different things.
> The fact that maven is used to start the debugger is not important.
gwt-maven-plugin is just a wrapper to invoke GWT Development Mode (Java class). Regardless of how you start GWT Development Mode, you need to specify which application (more precisely, GWT modules) you want to debug right when starting GWT Development Mode. See [1] - "module(s)" are always specific for given application.
[1] https://developers.google.com/web-toolkit/doc/latest/DevGuideCompilingAndDebugging#DevGuideCompilerOptions
> If I add "-P gwtdev" to default build using install-dev, all gwt applications
> should be built and installed using the extra debugging information, using:
Yes, as described in [2], besides using "gwtdev" profile for debugging, it can also be used for GWT compilation (i.e. "make install-dev") - in this case, resulting JavaScript will be un-obfuscated and not-too-optimized in order to easily profile the JavaScript application in the browser. In other words, using "gwtdev" for GWT compilation has nothing to do with debugging, maybe we should create separate profile for this purpose.
[2] http://www.ovirt.org/DebugFrontend#Compiling_Frontend_applications_in_detailed_mode
PS: I'll update http://www.ovirt.org/DebugFrontend with regard to standard development environment, as described in README.developer
Vojtech
----- Original Message -----
> From: "Alon Bar-Lev" <alonbl at redhat.com>
> To: awels at redhat.com
> Cc: engine-devel at ovirt.org
> Sent: Friday, June 7, 2013 10:07:40 PM
> Subject: Re: [Engine-devel] if there is a updated debug environment how to?
>
>
>
> ----- Original Message -----
> > From: "Alexander Wels" <awels at redhat.com>
> > To: "Alon Bar-Lev" <alonbl at redhat.com>
> > Cc: engine-devel at ovirt.org, "bigclouds" <bigclouds at 163.com>
> > Sent: Friday, June 7, 2013 10:56:40 PM
> > Subject: Re: [Engine-devel] if there is a updated debug environment how to?
> >
> > > > > So if I understand correctly, the following is sequence is required:
> > > > >
> > > > > Build and deploy code:
> > > > > $ make install-dev PREFIX="${HOME}/ovirt-engine"
> > > > > $ "${HOME}/ovirt-engine/share/ovirt-engine/services/ovirt-engine.py"
> > > > > start
> > > >
> > > > You missed this part:
> > > > 1. cd into the source code directory of either webadmin or user portal.
> > > > you have to change directory to either
> > > > frontend/webadmin/modules/webadmin
> > > > or frontend/webadmin/modules/userportal-gwtp
> > > >
> > > > As the maven gwt plugin is only defined in the webadmin and userportal
> > > > poms
> > > > and
> > > > not in the root pom.
> > >
> >
> > It doesn't make much sense to put the gwt plugin in the root pom, as the
> > root
> > pom has nothing to do with GWT. The plugin exists in userportal and
> > webadmin
> > as those are GWT modules. The debugger is specifically a GWT debugger, you
> > can't debug anything else with it.
>
> You perceive this as something of gwt project, while I perceive this part of
> the environment.
>
> What I expect it to allow as simple development environment as we can.
> Just like I enable the debug port of jboss automatically I would like to
> enable gwt debug.
>
> If I add "-P gwtdev" to default build using install-dev, all gwt applications
> should be built and installed using the extra debugging information, using:
>
> $ make install-dev PREFIX="${HOME}/ovirt-engine"
>
> I can even add GWT_DEBUGGER=1 to optionally enable/disable this feature.
>
> Now, after starting ovirt-engine service, all I expect is a simple command to
> start the gwt debugger.
>
> $ make gwt-debugger
> or:
> ./gwt-debugger
>
> The fact that maven is used to start the debugger is not important.
>
> What I do expect is that the debugger not to require a specific relation with
> specific application (Webadmin, userportal).
>
> I would have understood if I had to execute something like the following to
> run the debugger:
>
> $ cd frontend
> $ mvn gwt:debug -Dgwt.noserver=true
>
> Or better to avoid building anything:
>
> $ cd frontend/debugger
> $ mvn gwt:debug -Dgwt.noserver=true
>
> But I do not understand why a cd to specific application is required.
>
> Thanks!
> Alon
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel
>
More information about the Engine-devel
mailing list