Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Debugger not stopping at breakpoint

Help
asop
2012-10-27
2012-12-06
  • asop
    asop
    2012-10-27

    http://www.youtube.com/watch?v=Vs6Tqerevts

    In the video the first time round the debugger stops at the breakpoint, but not second time. The steps to reproduce this are as follows :

    1)Switch over to debug perspective

    2)Put breakpoint at  "myadd a b = a + b" in following piece of code :

    ****************
    module Main where

    res = myadd 2 4
    main = print (myadd 2 4)

    myadd :: Int -> Int -> Int
    myadd a b = a + b
    ****************

    3)Run->Debug

    4)When the debugger stops at breakpoint, click the red square button in "Console" window to stop debugger

    5)Click cursor in Main.hs. THIS IS CRUCIAL.

    6)Run->Debug. This time debugger does not stop at breakpoint.

     
  • asop
    asop
    2012-10-27

    Ah wait, this time round I am not able to reproduce it. The only difference is that I did a reboot since making the video. Let me study this in more details and get back to you. Thanks

     
  • asop
    asop
    2012-10-27

    OK I am NOT able to consistently replicate this (sometimes it happens and sometimes it does not). If I find a way to consistently replicate the problem then I will post here. Thanks

     
  • asop
    asop
    2012-10-27

    p.s. I am using :

    Eclipse 4.2.1
    Oracle Java 1.7.0_09
    EclipseFP 2.3.2

     
  • asop
    asop
    2012-10-27

    And GHC version 7.4.1

     
  • asop
    asop
    2012-10-27

    I found a workaround. If it does not stop at the breakpoint just press enter in the console window and then the breakpoint is activated.  I have uploaded a video at :

    http://www.youtube.com/watch?v=xDJzQe0r0CM&feature=youtu.be

    That is the first time round it gets stuck and the output in the console is :

    *Main> main
    Stopped at /home/administrator/Documents/eclipse-haskell/HaskellTest/src/Main.hs:7:1-17
    _result :: Int = _
    *Main>

    Just press enter in the console window and the breakpoint will be activated, with the output now becoming :

    *Main> main
    Stopped at /home/administrator/Documents/eclipse-haskell/HaskellTest/src/Main.hs:7:1-17
    _result :: Int = _
    *Main>
    *Main> -> main
      Stopped at /home/administrator/Documents/eclipse-haskell/HaskellTest/src/Main.hs:7:1-17
    *Main> Empty history. Perhaps you forgot to use :trace?
    *Main>  *Main> _result :: Int = _
    *Main> _result :: Int = _
    *Main> _result :: Int = _
    *Main> _result :: Int = _
    *Main> _result :: Int = _
    *Main> _result :: Int = _
    *Main>

     
  • asop
    asop
    2012-10-27

    Note that I have this "getting stuck problem" in eclipse versions 3.7.2, 3.8.1, and 4.2.1. However the above is a workaround.

     
  • JP Moresmau
    JP Moresmau
    2012-10-30

    I can't reproduce, but I've put some defensive code to avoid the only thing I can think of that would cause the problem…Don't know if you feel comfortable installing the source version from github and try it…

     
  • asop
    asop
    2012-10-31

    Hi I am happy to try and install from github. On the webpage : http://eclipsefp.github.com/dev.html it states that there are three components BuildWrapper, eclipsefp, and scion browser.

    Which do I install? Also how do I remove the old installs? Thanks

     
  • asop
    asop
    2012-10-31

    My installs are as follows :

    /usr/local/bin/buildwrapper
    /usr/local/bin/scion-browser
    /usr/bin/cabal

     
  • asop
    asop
    2012-10-31

    And my .cabal directory in my home directory is a symbolic link :

    .cabal -> /usr/local/share/cabal

     
  • JP Moresmau
    JP Moresmau
    2012-10-31

    No, you only need the Java side of things, the eclipsefp project only, buildwrapper and scion-browser are irrelevant to your issue, you can keep using whatever you've installed from Hackage.

     
  • JP Moresmau
    JP Moresmau
    2012-11-03

    Look at the instructions given in http://eclipsefp.github.com/dev.html. You need to get the source for EclipseFP from github, and use Eclipse itself to build EclipseFP. Basically EclipseFP is a set of Eclipse projects that you can build and debug from Eclipse.

     
  • asop
    asop
    2012-12-02

    Hi, when I try building the projects I get some errors. For example in net.sf.eclipsefp.haskell.debug.core :

    "The import net.sf.eclipsefp.haskell.debug.core.test cannot be resolved"

    And in net.sf.eclipsefp.haskell.core.test , in MockFile.java :

    "The type MockFile must implement the inherited abstract method IResource.accept(IResourceProxyVisitor, int, int)"

    Note that I am using :

    java version "1.7.0_09"
    Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
    Java HotSpot(TM) Client VM (build 23.5-b02, mixed mode)

    Do you know what I might need to do? Thanks

    p.s. on http://eclipsefp.github.com/dev.html the link "BIRT Charting Engine" (http://download.eclipse.org/birt/) does not exist.

     
  • JP Moresmau
    JP Moresmau
    2012-12-02

    asaop, please create a new topic when asking about something unrelated, much easier to follow. I see in the Eclipse API that  IResource.accept(IResourceProxyVisitor, int, int) is from 3.8, which I haven't installed it, so it's normal, the code is only compatible till Eclipse 3.7. However, these are old tests that you can safely ignore… Just add an empty method…