Re: Re: Speed of Maven build

2020-08-25 Thread Eric Bresie
Would multi threading/multi core parameters help speed things up?

https://stackoverflow.com/questions/32368976/ways-to-make-maven-build-faster/44646756#44646756

Or other speedups like limiting some activities or profile the builds?

https://medium.com/@alex_collins/10x-faster-maven-builds-at-intuit-5b7bb60c65e6

Eric Bresie
ebre...@gmail.com

> On August 25, 2020 at 12:27:02 AM CDT, Jaroslav Tulach 
>  wrote:
> > And it's Apache Maven, over the corner at https://maven.apache.org/ so
> > I suppose that community would be happy to get such contributions.
> >
> > -Bertrand
>
> You are right, Bertrand. Why not ask!
>
> Hello Maven guys,
> we had a discussion on the NetBeans mailing list recently and here is a
> summary:
> * Apache NetBeans IDE is delegating most of its work directly to Maven
> * Users however complain that the speed isn't great
> * One of the ideas was to launch a "zombie" instance of Maven in advance
> * then actions like build, exec or test would be faster
>
> Have you thought about something like this already? Any advices?
>
> Best regards.
> Jaroslav Tulach
> NetBeans Platform Architect
>
> ne 23. 8. 2020 v 9:06 odesílatel Jaroslav Tulach 
> napsal:
>
> > > I agree with others, Ant is much faster day to day. But the pom.xml has
> > > become the universal project file for Java,
> >
> > Thank you all for sharing your thoughts. I know Maven start is slower, but
> > I
> > learned to live with it. It is interesting to hear that some of you
> > maintain a
> > dual Ant based copy of your project metadata. Once we were trying a
> > different
> > approach:
> >
> > There is a way to speed Maven in the IDE. Launch Maven, let it read all
> > XML &
> > co. files and stop it. As soon as we need to build/run/test, wake up this
> > zombie Maven process, tell it what to do and let it continue. If the XML
> > files
> > are modified, throw the process away and initialize it again. Tomáš Stupka
> > implemented a prototype of this and there were no issues, as far as I know
> > (nobody tested it thoroughly however).
> >
> > Maybe the support is even in and there is a property to turn it on. If the
> > Maven startup is the biggest problem for you guys, we shall investigate
> > how to
> > turn Tomáš's work on...
> >
> > -jt
> >
> >
> >
> >
> >
> >


Re: JavaFX 2 support; modular java and refactoring

2020-08-25 Thread Ernie Rael

(One of those days...)

In bugzilla it was easy to create an "umbrella" issue using "depends on" 
to set up a parent/child relationship. Is there anything similar to do 
with jira.


Labels is a poor substitute. Consider the large number of differently 
spelled performance labels.


-ernie

On 8/25/2020 2:41 PM, Ernie Rael wrote:

Greetings,

I just did a pull request, 
https://github.com/apache/netbeans/pull/2331. (someday I'll learn not 
to tell people to file bugs) The problem arises from the 'JavaFX 2 
support' not being modular java friendly.


While looking at this I encountered some other issues. (I've got 8 
issues I'll be filing...). I suspect there are several others.


There doesn't seem to be a general support package for module-info 
interactions. From what I've seen so far, is that each project type 
does it's own thing. I expected some common helper classes for 
editing/querying module-info.


And it looks like refactoring doesn'thandle module-info related issues 
either.


Am I missing something?

-ernie


-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists







-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: JavaFX 2 support; modular java and refactoring

2020-08-25 Thread Ernie Rael

On 8/25/2020 2:41 PM, Ernie Rael wrote:

Greetings,

I just did a pull request, 
https://github.com/apache/netbeans/pull/2331. (someday I'll learn not 
to tell people to file bugs) The problem arises from the 'JavaFX 2 
support' not being modular java friendly.


While looking at this I encountered some other issues. (I've got 8 
issues I'll be filing...). I suspect there are several others.


There doesn't seem to be a general support package for module-info 
interactions. From what I've seen so far, is that each project type 
does it's own thing. I expected some common helper classes for 
editing/querying module-info.


And it looks like refactoring doesn'thandle module-info related issues 
either.


Am I missing something?

-ernie


-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists







-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





JavaFX 2 support; modular java and refactoring

2020-08-25 Thread Ernie Rael

Greetings,

I just did a pull request, https://github.com/apache/netbeans/pull/2331. 
(someday I'll learn not to tell people to file bugs) The problem arises 
from the 'JavaFX 2 support' not being modular java friendly.


While looking at this I encountered some other issues. (I've got 8 
issues I'll be filing...). I suspect there are several others.


There doesn't seem to be a general support package for module-info 
interactions. From what I've seen so far, is that each project type does 
it's own thing. I expected some common helper classes for 
editing/querying module-info.


And it looks like refactoring doesn'thandle module-info related issues 
either.


Am I missing something?

-ernie


-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: Speed of Maven build

2020-08-25 Thread Manfred Moser



Mickael Istria wrote on 2020-08-25 14:17 (GMT -07:00):

> I
> 
> On Tuesday, August 25, 2020, Manfred Moser  wrote:
>> And the VS code integration from Red Hat might also do something along
> those lines.
> 
> It embeds and uses m2eclipse.
> 

Haha.. thanks for confirming. I thought that to be the case but did not want to 
say it explicitly since I was only 80 or so percent sure.. 

manfred

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: Speed of Maven build

2020-08-25 Thread Mickael Istria
I

On Tuesday, August 25, 2020, Manfred Moser  wrote:
> And the VS code integration from Red Hat might also do something along
those lines.

It embeds and uses m2eclipse.

-- 
Mickael Istria
Eclipse IDE 
developer, for Red Hat Developers 


Re: Speed of Maven build

2020-08-25 Thread Manfred Moser
Also the M2Eclipse integration does basically embed maven and make the Maven 
build incremental.

The Takari plugin does that on the commandline with the eclipse compiler

And the VS code integration from Red Hat might also do something along those 
lines.

Others can chime in with more details.

Manfred

John Patrick wrote on 2020-08-25 13:29 (GMT -07:00):

> Are you planning to create a baseline project or selecting a range of
> projects to be used as a baseline, so that perceived improvements can
> be monitored? So that anyone wanting to help out or give feedback can
> submit their own build performance.
> 
> i.e.
> 1. Equipment OS, Ram, CPU, physical, virtual, docker, openshift, other
> 2. Java version
> 3. Maven version
> 4. Speedtest results
> 5. Direct Internet Connection or via Http Proxy or via Nexus/Artifactory
> 6. Clean/Fresh Local Repo Execution Time
> 7. 2nd Execution Time, after everything downloaded
> 
> As using Maven since 2005, I've found each new release has gotten
> faster and faster, and most performance issues have been around what
> OS I'm using, SSD vs HDD and also do you have enough free RAM etc.
> 
> As I'm surprised how quickly my builds are running at the moment, the
> only issue is when I see maven perform internet connections
> downloading new dependencies or say the versions plugin to check. Any
> thoughts about adding a HTTP/2 Server Push support so if it's Maven
> Aware and you request the pom it can also push back the hashes and
> maybe the jar too.
> 
> Regarding a "zombie" maven instance, it should be opt in so i need to
> explicitly enable it as often i'm jumping around between lots of
> projects so don't want each having a "zombie" progress and i might not
> be building that project again for another week maybe.
> 
> John
> 
> On Tue, 25 Aug 2020 at 12:27, Jeff Jensen
>  wrote:
>>
>> In case this helps, Jason Dillon has a "Maven Shell" that does what you
>> seek for CLI - launches a Maven instance and runs interactive commands with
>> it, saving the startup time.
>> https://github.com/jdillon/mvnsh
>>
>>
>> On Tue, Aug 25, 2020 at 12:27 AM Jaroslav Tulach 
>> wrote:
>>
>> > > And it's Apache Maven, over the corner at https://maven.apache.org/ so
>> > > I suppose that community would be happy to get such contributions.
>> > >
>> > > -Bertrand
>> >
>> > You are right, Bertrand. Why not ask!
>> >
>> > Hello Maven guys,
>> > we had a discussion on the NetBeans mailing list recently and here is a
>> > summary:
>> > * Apache NetBeans IDE is delegating most of its work directly to Maven
>> > * Users however complain that the speed isn't great
>> > * One of the ideas was to launch a "zombie" instance of Maven in advance
>> > * then actions like build, exec or test would be faster
>> >
>> > Have you thought about something like this already? Any advices?
>> >
>> > Best regards.
>> > Jaroslav Tulach
>> > NetBeans Platform Architect
>> >
>> > ne 23. 8. 2020 v 9:06 odesílatel Jaroslav Tulach <
>> > jaroslav.tul...@gmail.com>
>> > napsal:
>> >
>> > > > I agree with others, Ant is much faster day to day. But the pom.xml has
>> > > > become the universal project file for Java,
>> > >
>> > > Thank you all for sharing your thoughts. I know Maven start is slower,
>> > but
>> > > I
>> > > learned to live with it. It is interesting to hear that some of you
>> > > maintain a
>> > > dual Ant based copy of your project metadata. Once we were trying a
>> > > different
>> > > approach:
>> > >
>> > > There is a way to speed Maven in the IDE. Launch Maven, let it read all
>> > > XML &
>> > > co. files and stop it. As soon as we need to build/run/test, wake up this
>> > > zombie Maven process, tell it what to do and let it continue. If the XML
>> > > files
>> > > are modified, throw the process away and initialize it again. Tomáš
>> > Stupka
>> > > implemented a prototype of this and there were no issues, as far as I
>> > know
>> > > (nobody tested it thoroughly however).
>> > >
>> > > Maybe the support is even in and there is a property to turn it on. If
>> > the
>> > > Maven startup is the biggest problem for you guys, we shall investigate
>> > > how to
>> > > turn Tomáš's work on...
>> > >
>> > > -jt
>> > >
>> > >
>> > >
>> > >
>> > >
>> > >
>> >
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
> 
> 

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: Speed of Maven build

2020-08-25 Thread John Patrick
Are you planning to create a baseline project or selecting a range of
projects to be used as a baseline, so that perceived improvements can
be monitored? So that anyone wanting to help out or give feedback can
submit their own build performance.

i.e.
1. Equipment OS, Ram, CPU, physical, virtual, docker, openshift, other
2. Java version
3. Maven version
4. Speedtest results
5. Direct Internet Connection or via Http Proxy or via Nexus/Artifactory
6. Clean/Fresh Local Repo Execution Time
7. 2nd Execution Time, after everything downloaded

As using Maven since 2005, I've found each new release has gotten
faster and faster, and most performance issues have been around what
OS I'm using, SSD vs HDD and also do you have enough free RAM etc.

As I'm surprised how quickly my builds are running at the moment, the
only issue is when I see maven perform internet connections
downloading new dependencies or say the versions plugin to check. Any
thoughts about adding a HTTP/2 Server Push support so if it's Maven
Aware and you request the pom it can also push back the hashes and
maybe the jar too.

Regarding a "zombie" maven instance, it should be opt in so i need to
explicitly enable it as often i'm jumping around between lots of
projects so don't want each having a "zombie" progress and i might not
be building that project again for another week maybe.

John

On Tue, 25 Aug 2020 at 12:27, Jeff Jensen
 wrote:
>
> In case this helps, Jason Dillon has a "Maven Shell" that does what you
> seek for CLI - launches a Maven instance and runs interactive commands with
> it, saving the startup time.
> https://github.com/jdillon/mvnsh
>
>
> On Tue, Aug 25, 2020 at 12:27 AM Jaroslav Tulach 
> wrote:
>
> > > And it's Apache Maven, over the corner at https://maven.apache.org/ so
> > > I suppose that community would be happy to get such contributions.
> > >
> > > -Bertrand
> >
> > You are right, Bertrand. Why not ask!
> >
> > Hello Maven guys,
> > we had a discussion on the NetBeans mailing list recently and here is a
> > summary:
> > * Apache NetBeans IDE is delegating most of its work directly to Maven
> > * Users however complain that the speed isn't great
> > * One of the ideas was to launch a "zombie" instance of Maven in advance
> > * then actions like build, exec or test would be faster
> >
> > Have you thought about something like this already? Any advices?
> >
> > Best regards.
> > Jaroslav Tulach
> > NetBeans Platform Architect
> >
> > ne 23. 8. 2020 v 9:06 odesílatel Jaroslav Tulach <
> > jaroslav.tul...@gmail.com>
> > napsal:
> >
> > > > I agree with others, Ant is much faster day to day. But the pom.xml has
> > > > become the universal project file for Java,
> > >
> > > Thank you all for sharing your thoughts. I know Maven start is slower,
> > but
> > > I
> > > learned to live with it. It is interesting to hear that some of you
> > > maintain a
> > > dual Ant based copy of your project metadata. Once we were trying a
> > > different
> > > approach:
> > >
> > > There is a way to speed Maven in the IDE. Launch Maven, let it read all
> > > XML &
> > > co. files and stop it. As soon as we need to build/run/test, wake up this
> > > zombie Maven process, tell it what to do and let it continue. If the XML
> > > files
> > > are modified, throw the process away and initialize it again. Tomáš
> > Stupka
> > > implemented a prototype of this and there were no issues, as far as I
> > know
> > > (nobody tested it thoroughly however).
> > >
> > > Maybe the support is even in and there is a property to turn it on. If
> > the
> > > Maven startup is the biggest problem for you guys, we shall investigate
> > > how to
> > > turn Tomáš's work on...
> > >
> > > -jt
> > >
> > >
> > >
> > >
> > >
> > >
> >

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: Speed of Maven build

2020-08-25 Thread Will Hartung
On Tue, Aug 25, 2020 at 4:37 AM Jeff Jensen <
jeffjen...@upstairstechnology.com> wrote:

> In case this helps, Jason Dillon has a "Maven Shell" that does what you
> seek for CLI - launches a Maven instance and runs interactive commands with
> it, saving the startup time.
> https://github.com/jdillon/mvnsh
>
> Is this really where the runtime for Maven goes? I always felt it was
loading the POMs, walking the dependencies, plus all the network hits
(which can be mitigated with the -o flag).


Re: Is JShell suposed to work?

2020-08-25 Thread Jeremy Cavanagh

Thanks John,

I have already looked at some of these but still no luck. So I shall 
give it a rest for now.


Regards

Jeremy

On 24/08/2020 22:09, John Kostaras wrote:

There seem to be still a number of open issues about JShell in JIRA

(also a google search

).

It could be many things. Messed up classpath in your system, migrating the
profile of a previous NB installation etc.

You may try some advice here
.
Otherwise, try a clean install of NetBeans, modifying etc/netbeans.conf
pointing to a correct jdk (>8).





On Mon, 24 Aug 2020 at 20:46, Laszlo Kishalmi 
wrote:


Thanks Geertjan!

I was fixated searching for JShell not Java Platform Shell.

Checked on Linux with 14.0.2-zulu. It works as expected.

On 8/24/20 9:26 AM, Geertjan Wielenga wrote:

Should be in two places — right-click on a project (to include the

project

path in the shell) and under the Tools menu.

Gj

On Mon, 24 Aug 2020 at 18:20, Laszlo Kishalmi 
Hmm, I no longer find the action for JShell in the IDE. 12.1-beta3



On 8/24/20 7:06 AM, Jeremy Cavanagh wrote:


Hi,
I've installed 12.1b3 via the binary on macOS 10.14.6 and used it with
zulu-11 and 14 jdks no problem.
I have been very adventurous installing payara etc. things that I have
not done before! Maven works, I can index local and remote servers,
download etc.
I've Created simple maven, payara and JavaFX projects all very
successfully.
And much more...
Everything works to my personal amazement (absolutely no negative
expectations of all you hard working committers, just tremendous
congrats to all).
However, there is just one thing that I cannot sort out and that is
JShell. It works fine in the terminal with jdk 11 and 14, but for the
life of me, I cannot get it to work in Apache NetBeans.
I get a long winded error message (abbreviated)
Could not initialize JShell: ...
... caused by: VM initialization failed for:
/Library/Java/JavaVirtualMachines/zulu-14.jdk/Contents/Home/bin/java
-classpath
/Users/***/java/modules/ext/nb-mod-jshell-probe.jar: -Xdebug
-Xrunjdwp:transport=dt_socket,address=mbp.home:54663,suspend=y
org.netbeans.lib.jshell.agent.AgentWorker 54662
Any ideas?
Regards
Jeremy
-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



-

To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org

For additional commands, e-mail: dev-h...@netbeans.apache.org



For further information about the NetBeans mailing lists, visit:

https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists










-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists








-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: Speed of Maven build

2020-08-25 Thread Jeff Jensen
In case this helps, Jason Dillon has a "Maven Shell" that does what you
seek for CLI - launches a Maven instance and runs interactive commands with
it, saving the startup time.
https://github.com/jdillon/mvnsh


On Tue, Aug 25, 2020 at 12:27 AM Jaroslav Tulach 
wrote:

> > And it's Apache Maven, over the corner at https://maven.apache.org/ so
> > I suppose that community would be happy to get such contributions.
> >
> > -Bertrand
>
> You are right, Bertrand. Why not ask!
>
> Hello Maven guys,
> we had a discussion on the NetBeans mailing list recently and here is a
> summary:
> * Apache NetBeans IDE is delegating most of its work directly to Maven
> * Users however complain that the speed isn't great
> * One of the ideas was to launch a "zombie" instance of Maven in advance
> * then actions like build, exec or test would be faster
>
> Have you thought about something like this already? Any advices?
>
> Best regards.
> Jaroslav Tulach
> NetBeans Platform Architect
>
> ne 23. 8. 2020 v 9:06 odesílatel Jaroslav Tulach <
> jaroslav.tul...@gmail.com>
> napsal:
>
> > > I agree with others, Ant is much faster day to day. But the pom.xml has
> > > become the universal project file for Java,
> >
> > Thank you all for sharing your thoughts. I know Maven start is slower,
> but
> > I
> > learned to live with it. It is interesting to hear that some of you
> > maintain a
> > dual Ant based copy of your project metadata. Once we were trying a
> > different
> > approach:
> >
> > There is a way to speed Maven in the IDE. Launch Maven, let it read all
> > XML &
> > co. files and stop it. As soon as we need to build/run/test, wake up this
> > zombie Maven process, tell it what to do and let it continue. If the XML
> > files
> > are modified, throw the process away and initialize it again. Tomáš
> Stupka
> > implemented a prototype of this and there were no issues, as far as I
> know
> > (nobody tested it thoroughly however).
> >
> > Maybe the support is even in and there is a property to turn it on. If
> the
> > Maven startup is the biggest problem for you guys, we shall investigate
> > how to
> > turn Tomáš's work on...
> >
> > -jt
> >
> >
> >
> >
> >
> >
>


Re: How to debug netbeans

2020-08-25 Thread Neil C Smith
On Tue, 25 Aug 2020 at 11:26, Carl Mosca  wrote:
> I have been working with the dcevm
>  and NetBeans a bit
> lately and hotswapping classes works nicely in some current use cases
> (remote web applications for example).

Don't get me started on everything that is wrong about the usual
approach to hotswapping in Java! ;-)

Best wishes,

Neil

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: How to debug netbeans

2020-08-25 Thread Carl Mosca
In general, I find that NetBeans alone works nicely for my debugging
sessions.  There are certainly some nice features which I believe makes it
a very practical tool.

I have used JRebel in the past but I must say the company (sold twice I
think) has made things a bit less friendly with respect to licensing.  (We
have cases for which a license file is needed but we have only been
provided ones that expire in about 30 days despite the fact that our
licenses are for one year)

I have been working with the dcevm
 and NetBeans a bit
lately and hotswapping classes works nicely in some current use cases
(remote web applications for example).

The one issue I am seeing is that resources, such as JSF files, are not
automatically reloaded (remotely).

Carl


On Tue, Aug 25, 2020 at 4:34 AM Jean-Marc Borer  wrote:

> I also kind of disagree with Tim about it un-usefulness of a debugger. You
> can achieve way more that just stepping through the code. You can even
> dynamically add debugging traces without needing to touch the code and this
> he forgets: you cannot add logging statements for code you cannot compile
> yourself such as the JVM for example or other Maven artifacts. Have a look
> as well at tools such JRebel and Yourkit. They are use cases where they
> help you to save a lot of time.
>
> Cheers,
>
> JM
>
>
>
> On Thu, Aug 6, 2020 at 7:50 PM Matthias Bläsing  >
> wrote:
>
> > Hi,
> >
> > I don't think debugging with logging/println statements and debugging
> > are either or. Both are approach that can be taken.
> >
> > HOWEVER, if you are new to programming, learn to use a debugger. While
> > there is learning involved and it is not always the right tool, having
> > it available is a great help.
> >
> > In a past job we had a central staging JavaEE server, that was used to
> > do QS testing with the end users. That server had the jpdw agent loaded
> > and at times it was invaluable to be able to just debug in the testing
> > system with the user reproducing his problem.
> >
> > With a debugger it is much easier to explorer the current runtime
> > environment and in contrast to logging statements, you don't need to
> > know what you want to know before it happens.
> >
> > Contrary to Tims reply a debugger does not require you to single step
> > through code. Line break points are pretty fast, method break points
> > are slower, but can be helpful to get to the offending code quickly.
> >
> > In the end the same advise as in many other cases in IT applies:
> >
> > - Know your tools (also the ones you may not like)
> > - Know when to use which tool
> >
> > Just a second perspective
> >
> > Matthias
> >
> > Am Donnerstag, den 06.08.2020, 03:12 -0400 schrieb Tim Boudreau:
> > > I've been developing NetBeans itself and plugins for it for 21 years
> now.
> > > In that time I have run a debugger against NetBeans maybe ONCE, to see
> if
> > > it worked.
> > >
> > > The startup time penalty, and the odds of winding up stepping through
> > code
> > > you actually need to see, rather than marching endlessly through
> > > java.util.Logger's source code and other irrelevant stuff, are
> > > infinitesimal.  Debuggers are a great tool for debugging algorithms you
> > can
> > > isolate in a test or tiny application, or for learning how programs
> work
> > > when you're learning to program.  As a tool for fixing things in huge
> > > applications with deep stacks, they're pretty much useless - way too
> much
> > > distracting noise and way to little signal.
> > >
> > > My suggestion is, learn to love logging statements and
> > > System.out.println().  You can isolate problems quite fast if you do a
> > sort
> > > of logging-binary-search - add a logging statement entering the code
> > where
> > > something goes wrong, and one at a point where that thing probably has
> > > already gone wrong.  If that works as expected, add logging at the
> > midpoint
> > > between those two points.  Still okay at the midpoint?  Add one between
> > the
> > > middle and end - and so forth until you're on the line where things
> > really
> > > do go wrong (usually just narrowing down the scope lets you see it).
> > >
> > > Sorry to be a downer on debuggers, but I can count on one hand the
> number
> > > of times I have learned anything useful from a debugger, and all of
> those
> > > times I could have probably found it faster if I'd just read the code.
> > >
> > > -Tim
> >
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
> > For additional commands, e-mail: dev-h...@netbeans.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
> >
> >
> >
>


-- 
Carl J. Mosca


Re: How to debug netbeans

2020-08-25 Thread Jean-Marc Borer
I also kind of disagree with Tim about it un-usefulness of a debugger. You
can achieve way more that just stepping through the code. You can even
dynamically add debugging traces without needing to touch the code and this
he forgets: you cannot add logging statements for code you cannot compile
yourself such as the JVM for example or other Maven artifacts. Have a look
as well at tools such JRebel and Yourkit. They are use cases where they
help you to save a lot of time.

Cheers,

JM



On Thu, Aug 6, 2020 at 7:50 PM Matthias Bläsing 
wrote:

> Hi,
>
> I don't think debugging with logging/println statements and debugging
> are either or. Both are approach that can be taken.
>
> HOWEVER, if you are new to programming, learn to use a debugger. While
> there is learning involved and it is not always the right tool, having
> it available is a great help.
>
> In a past job we had a central staging JavaEE server, that was used to
> do QS testing with the end users. That server had the jpdw agent loaded
> and at times it was invaluable to be able to just debug in the testing
> system with the user reproducing his problem.
>
> With a debugger it is much easier to explorer the current runtime
> environment and in contrast to logging statements, you don't need to
> know what you want to know before it happens.
>
> Contrary to Tims reply a debugger does not require you to single step
> through code. Line break points are pretty fast, method break points
> are slower, but can be helpful to get to the offending code quickly.
>
> In the end the same advise as in many other cases in IT applies:
>
> - Know your tools (also the ones you may not like)
> - Know when to use which tool
>
> Just a second perspective
>
> Matthias
>
> Am Donnerstag, den 06.08.2020, 03:12 -0400 schrieb Tim Boudreau:
> > I've been developing NetBeans itself and plugins for it for 21 years now.
> > In that time I have run a debugger against NetBeans maybe ONCE, to see if
> > it worked.
> >
> > The startup time penalty, and the odds of winding up stepping through
> code
> > you actually need to see, rather than marching endlessly through
> > java.util.Logger's source code and other irrelevant stuff, are
> > infinitesimal.  Debuggers are a great tool for debugging algorithms you
> can
> > isolate in a test or tiny application, or for learning how programs work
> > when you're learning to program.  As a tool for fixing things in huge
> > applications with deep stacks, they're pretty much useless - way too much
> > distracting noise and way to little signal.
> >
> > My suggestion is, learn to love logging statements and
> > System.out.println().  You can isolate problems quite fast if you do a
> sort
> > of logging-binary-search - add a logging statement entering the code
> where
> > something goes wrong, and one at a point where that thing probably has
> > already gone wrong.  If that works as expected, add logging at the
> midpoint
> > between those two points.  Still okay at the midpoint?  Add one between
> the
> > middle and end - and so forth until you're on the line where things
> really
> > do go wrong (usually just narrowing down the scope lets you see it).
> >
> > Sorry to be a downer on debuggers, but I can count on one hand the number
> > of times I have learned anything useful from a debugger, and all of those
> > times I could have probably found it faster if I'd just read the code.
> >
> > -Tim
>
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
> For additional commands, e-mail: dev-h...@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>