This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version: NetBeans IDE Dev (Build 201504020001) Java: 1.8.0_31; Java HotSpot(TM) 64-Bit Server VM 25.31-b07 Runtime: Java(TM) SE Runtime Environment 1.8.0_31-b13 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb) User directory: C:\Users\cendrowiczm\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\cendrowiczm\AppData\Local\NetBeans\Cache\dev It is NOT a defect. It is my concern only. When executing the action 'Profile Class' or 'Profile Method' starting from e.g. the 'Navigator' and choosing currently opened project when asked for project to profile, the IDE starts profiler session for this project (runs its 'Main Class'). Indeed, the profiler does NOT profile the entity selected in the 'Navigator' - either class or method. This means that the actions 'Profile Class' or 'Profile Method' do not do what their names are actually saying to the user. On the other hand it is possible to profile a class or method by attaching to external process but the user must start these processes first. IMO, the 'Profile Class' or 'Profile Method' actions should start these processes automatically.
Use Case #1: 1. Open the MemoryLeakOrNot?|Example3.java 2. Select the main method in the 'Navigator' and execute the 'Profile Method' action 3. Select MemoryLeakOrNot? when asked for project to profile Result: The IDE runs the MemoryLeakOrNot? project (Example2|main) and starts profiler session for it. Should be (IMO): The IDE runs the Example3|main and starts profiler session for it. Use Case #2: 1. Open the MemoryLeakOrNot?|Example3.java 2. Select the class Example3 in the 'Navigator' and execute the 'Profile Class' action 3. Select MemoryLeakOrNot? when asked for project to profile Result: The IDE runs the MemoryLeakOrNot? project (Example2|main) and starts profiler session for it. Should be (IMO): The IDE recognizes and runs the Example3|main and starts profiler session for it.