Bug 384187 - breakpoint management not allowed
Summary: breakpoint management not allowed
Status: RESOLVED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Photran.Debugger & Console View (show other bugs)
Version: 6.0   Edit
Hardware: PC Windows 7
: P1 critical (vote)
Target Milestone: 8.0.4   Edit
Assignee: Jeffrey Overbey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 384226 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-07-03 13:45 EDT by marcelo vanti CLA
Modified: 2013-02-08 13:43 EST (History)
10 users (show)

See Also:


Attachments
fix (2.96 KB, patch)
2013-01-15 15:41 EST, Nicolas Blanc CLA
no flags Details | Diff
fix (2.99 KB, patch)
2013-01-16 04:22 EST, Nicolas Blanc CLA
no flags Details | Diff
fix (2.12 KB, patch)
2013-01-16 05:01 EST, Nicolas Blanc CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description marcelo vanti CLA 2012-07-03 13:45:27 EDT
Build Identifier: Version: 4.2.0 Build id: I20120608-1400

When using debug in photran, I can not toggle breakpoints in any fortran project. If it is a new project (not helloworld example), all breakpoint commands are disabled. 

Reproducible: Always

Steps to Reproduce:
1. Set a new fortran project
2. Write any code and compile it
3. Try to set any breakpoint
Comment 1 Christian Rab CLA 2012-08-17 06:33:59 EDT
*** Bug 384226 has been marked as a duplicate of this bug. ***
Comment 2 Christian Rab CLA 2012-08-24 16:01:01 EDT
Although Bug 384226 is a duplicate of this bug, I just want to mention that this also happens in Linux and Mac OSX and also
with Photran Version 8.0.
Comment 3 Thierry Schwoertzig CLA 2012-09-25 04:57:00 EDT
Hi,

I reproduced the problem. I can't set breakpoints by clicking. Only "parallel breakpoints" types are available (green ones). 
I work with linux64, Eclipse Juno Release Build id: 20120614-1722, and PTP version 6.0.0.201206130201

Update 6.0.1 from  http://download.eclipse.org/tools/ptp/updates/juno does not solve this problem.

Does anybody have a solution ?

Thanks
Comment 4 Neal Kruis CLA 2012-09-25 18:55:11 EDT
I can also confirm this bug on Windows and MacOSX with Photran version 8.0. Any idea when this might be resolved?

Thanks!
Comment 5 Neal Kruis CLA 2012-09-26 17:41:47 EDT
I found that it is possibile to set breakpoints by manually adding them to the .gdbinit file.

e.g.

break <file>:<line number>

it is just not possible to add them via the interface.
Comment 6 Mike Garrahan CLA 2012-09-28 12:47:24 EDT
(In reply to comment #3)
> I reproduced the problem. I can't set breakpoints by clicking. Only
> "parallel breakpoints" types are available (green ones). 
> I work with linux64, Eclipse Juno Release Build id: 20120614-1722, and PTP
> version 6.0.0.201206130201
> 
> Update 6.0.1 from  http://download.eclipse.org/tools/ptp/updates/juno does
> not solve this problem.

Photran 8.0.2.201209141911 and PTP 6.0.2.201209181406 behave the same way for me (Sun Java 1.6, openSUSE 11.4, x86_64). Please make this a priority. I will keep using Indigo until this is fixed in Juno.
Comment 7 Daniel Harenberg CLA 2012-10-03 09:42:46 EDT
I can confirm that this does not work with the latest updates, i.e. with PTP 6.0.2/Photran 8.0.2 on Ubuntu 12.04 with Eclipse Juno.

Right-clicking on the line numbers to manage breakpoints shows all breakpoint actions greyed out. Cannot set breakpoints in the Breakpoint View either.

Please make this highest importance.

Thanks!
Comment 8 Claus Haslauer CLA 2012-11-12 02:32:58 EST
With Photran 8.0.2 / eclipse 4.2.1 on OS 10.8.2 I experience the same issue. 

I'd appreciate a fix.
Thank you.
Claus
Comment 9 Daniel Harenberg CLA 2012-11-12 02:54:27 EST
Has this been fixed in Photran 6.0.3 (released today)? If not, is there a target release / date?
Comment 10 Samuel Debionne CLA 2012-12-13 10:13:10 EST
I can confirm that this does not work with the latest updatesPhotran 8.0.3 on Windows 7 x64.

Please make this highest importance.

Thanks!
Comment 11 Dmitry Kabanov CLA 2012-12-17 10:44:30 EST
Eclipse with PTP 6.0.3 and Photran 8.0.3 has the same issue.

Please fix it!
Comment 12 Nicolas Blanc CLA 2013-01-15 15:41:59 EST
Created attachment 225658 [details]
fix

After debugging for a while I found out that no ToggleBreakpointsTargetFactory could be created for FortranEditor --ToggleBreakpointsTargetManager.getToggleBreakpointsTarget(IWorkbenchPart, ISelection) line: 535.

Then I noticed that the extension org.eclipse.debug.ui.toggleBreakpointsTargetFactories was commented out in Plugin org.eclipse.photran.ui/plugin.xml.

Just re-enabling the plug-in did not work because the class org.eclipse.cdt.debug.internal.ui.actions.ToggleCBreakpointsTargetFactory could not be found at runtime from org.eclipse.cdt.photran.ui.

So to avoid this issue, I created an empty class from ToggleCBreakpointsTargetFactory and added a dependency for org.eclipse.cdt.debug.ui in org.eclipse.photran.ui.

After tese steps I could finally set\remove breakpoints in Fortran again.

I hope that some more exprienced Photran developer can pickup from here and help fix this issue.
Comment 13 Nicolas Blanc CLA 2013-01-16 04:22:53 EST
Created attachment 225690 [details]
fix
Comment 14 Nicolas Blanc CLA 2013-01-16 05:01:19 EST
Created attachment 225693 [details]
fix

Actually, one only needs to re-enable the extension ToggleCbreakpointsTargerFactory and add a dependency for org.eclipse.cdt.debug.ui to fix this issue.
Comment 15 Nicolas Blanc CLA 2013-01-16 12:28:26 EST
The extension was disabled in revision: ed686fe64b33d7cc10bcbd47f6690a4812992d89.

commit ed686fe64b33d7cc10bcbd47f6690a4812992d89
Author: Jeffrey Overbey <jeffreyoverbey@acm.org>
Date:   Thu Oct 13 23:51:03 2011 +0000

    Bug 360891 - [Architecture] Photran core, core.vpg, and UI should not depend on CDT - removed dependencies from photran.ui
Comment 16 Jeffrey Overbey CLA 2013-01-16 12:49:03 EST
Thanks for looking at this, Nicolas.  I'll try to take over and commit a fix this weekend.

Your patch gives me enough information to fix the problem.  Thanks!

In the revision you mentioned, the CDT-dependent editor code (or most of it?) was moved from photran.ui into photran.cdtinterface, so I might end up putting the fix there instead of directly in photran.ui...

Thanks again for the help.
Comment 17 Jeffrey Overbey CLA 2013-01-23 11:15:33 EST
This is fixed in ptp_6_0 for Juno SR2.  I still need to merge the fix into HEAD.
Comment 18 Daniel Harenberg CLA 2013-01-26 06:44:52 EST
Yay, great news!

Thanks Nicolas and Jeff! This is so important for me!

Looking forward to Juno SR2!
Comment 19 Jeffrey Overbey CLA 2013-02-08 13:43:30 EST
This is fixed in HEAD for Photran 8.1 (as well as Juno SR2).