Hi Shujing,

On 03/03/2018 07:14 PM, Shujing Ke wrote:
or bc from command line. But when I tried to do the same thing in VSCode, it always couldn't attach to the process and complains that "attach: program path 'enter program name, for example /home/rainkekeke/atomspace/a.out' does not exist".

After clicking on the little bug icon, click on the cogwheel, it will open a launch.json file you need to configure, put the executable you which to debug in the target (guile for instance), then press the play button it should work.

In Emacs, one would call the debugger with M-x compile <return> gdb.


I think if it doesn't even work well with c++, then it probably can't do much in debugging scheme...

I don't know about debugging scheme in VSCode. For Emacs, as Cassio has suggested, Geiser seems quite good (I haven't tried it yet).

I would suggest though that, before using a front-end for gdb or guile, you familiarize yourself with their terminal interface, just to get an idea of how these tools operate.

Nil


Shujing

On Fri, Mar 2, 2018 at 9:16 PM, Nil Geisweiller <ngeis...@googlemail.com <mailto:ngeis...@googlemail.com>> wrote:

    On 03/02/2018 01:42 PM, Shujing Ke wrote:

        Awesome! I installed VSCode and immediately like it!
        Which Scheme extension did you install? Is it this one:
        
https://marketplace.visualstudio.com/items?itemName=sjhuangx.vscode-scheme
        
<https://marketplace.visualstudio.com/items?itemName=sjhuangx.vscode-scheme>


    Yes, that's the one I tried. It doesn't seem to provide much more
    than syntax highlighting but I guess that's OK for starter.

    Anyway, it takes time to even realize that you need a powerful
    editor like Emacs. I remember for the first 10 years of my
    programming life I mostly used very rudimentary editors like
    notepad. Once on Linux I started using Emacs like another notepad.
    For a whole 5 years I didn't tap into its giant potential! Then
    patterns started to surface, and I thought more and more "I which my
    editor could do that". At some point I even switched to an inferior
    editor to supposedly empower myself. It's pathetic but I didn't know
    what Emacs could do. Then after more research I realized that this
    ugly looking editor I had been using for years could do ALL that I
    wished. It was a revelation, I spent hundreds of hours discovering
    Emacs to its finest abilities over the following months. I was
    completely obsessed, and my emacs config file grew from zero to 4K
    lines. I had become an emacstheist, an emacstremist, a devoted
    apostle of the church of Emacs.

    Nil


        Thanks,
        Shujing




        On Thu, Mar 1, 2018 at 8:47 AM, Nil Geisweiller
        <ngeis...@googlemail.com <mailto:ngeis...@googlemail.com>
        <mailto:ngeis...@googlemail.com
        <mailto:ngeis...@googlemail.com>>> wrote:

             I've just tried Spacemacs, and as awesome as it looks it's
        still
             hard to approach, I can see that if I were not familiar
        with Emacs I
             would be utterly lost. The online help is pretty good
        though, but it
             does require to take the time to go through it, while VSCode is
             intuitive at first use.

             I still suspect Emacs is superior to VSCode (good luck
        trying to run
             VSCode on a headless server + a zillion other things I'm
        sure), but
             for newbies the ready-to-go nature of VSCode is pretty
        tempting.

             Nil


             On 03/01/2018 08:19 AM, Nil Geisweiller wrote:

                 I've just realized an open source branch of Visual Studio
                 exists, VSCode. I've tried it, it's surprisingly good, it's
                 lean, not tones of junk getting in your way (unlike the old
                 versions of VS I remember). I was able to install some
        scheme
                 extension and it got my scheme files highlighted. I
        don't how
                 far it can go, but I feel this has definitely potential.

                 Nil

                 On 03/01/2018 01:21 AM, Shujing Ke wrote:

                     Thanks.

                     If there is no any real time debugger for scheme with
                     inspector, then I would just try to use spacemacs
        as Nil
                     recommended.

                     I debug c++ code with qt creator by attaching to
        debugger to
                     process.

                     Shujing

                     On Wed, Feb 28, 2018 at 9:01 PM, Linas Vepstas
                     <linasveps...@gmail.com
        <mailto:linasveps...@gmail.com> <mailto:linasveps...@gmail.com
        <mailto:linasveps...@gmail.com>>
                     <mailto:linasveps...@gmail.com
        <mailto:linasveps...@gmail.com>
                     <mailto:linasveps...@gmail.com
        <mailto:linasveps...@gmail.com>>>> wrote:



                          On Wed, Feb 28, 2018 at 1:39 PM, Amirouche
        Boubekki
                          <amirouche.boube...@gmail.com
        <mailto:amirouche.boube...@gmail.com>
                     <mailto:amirouche.boube...@gmail.com
        <mailto:amirouche.boube...@gmail.com>>
                     <mailto:amirouche.boube...@gmail.com
        <mailto:amirouche.boube...@gmail.com>

                     <mailto:amirouche.boube...@gmail.com
        <mailto:amirouche.boube...@gmail.com>>>>
                          wrote:

                          > AFAIK, there is not step debugger in Guile
        like gdb
                     where you can inspect
                          > values at runtime etc...
                          > except if you do live coding and embed an
        REPL in you
                     app, but I am not sure
                          > this is supported by opencog...

                          So: First, the default mode for opencog is to
        run the
                     guile REPL and
                          load opencog as a module.  You can even start the
                     cogserver that
                          way.  So whatever the guile repl offers, its
        available
                     for opencog.

                          To debug the C++ code, you can start guile in
        gdb, then
                     load the
                          opencog modules. Nil has a bunch of gdb macros
        set up
                     to print
                          assorted C++ objects.

                          How hard is it to write an ecplise module? If
        eclipse
                     already has
                          modules for racket, sch48, why not just make a
        copy of
                     one or the
                          other, and then edit it, and change racket
        into guile?             Then you'd
                          have a guile module for eclipse, right?

                          --linas


                          --     cassette tapes - analog TV - film
        cameras - you

                          --     You received this message because you are
                     subscribed to the Google
                          Groups "opencog" group.
                          To unsubscribe from this group and stop receiving
                     emails from it,
                          send an email to
        opencog+unsubscr...@googlegroups.com
        <mailto:opencog%2bunsubscr...@googlegroups.com>
                     <mailto:opencog%2bunsubscr...@googlegroups.com
        <mailto:opencog%252bunsubscr...@googlegroups.com>>
                          <mailto:opencog+unsubscr...@googlegroups.com
        <mailto:opencog%2bunsubscr...@googlegroups.com>
                     <mailto:opencog%2bunsubscr...@googlegroups.com
        <mailto:opencog%252bunsubscr...@googlegroups.com>>>.
                          To post to this group, send email to
        opencog@googlegroups.com <mailto:opencog@googlegroups.com>
        <mailto:opencog@googlegroups.com <mailto:opencog@googlegroups.com>>
                          <mailto:opencog@googlegroups.com
        <mailto:opencog@googlegroups.com>
                     <mailto:opencog@googlegroups.com
        <mailto:opencog@googlegroups.com>>>.
                          Visit this group at
        https://groups.google.com/group/opencog
        <https://groups.google.com/group/opencog>
                     <https://groups.google.com/group/opencog
        <https://groups.google.com/group/opencog>>
                          <https://groups.google.com/group/opencog
        <https://groups.google.com/group/opencog>
                     <https://groups.google.com/group/opencog
        <https://groups.google.com/group/opencog>>>.
                          To view this discussion on the web visit
        
https://groups.google.com/d/msgid/opencog/CAHrUA379gBZu6ss19Er_6%2BRCbG8gaizA0%3Dj8BMGaLdEuzjJMQA%40mail.gmail.com
        
<https://groups.google.com/d/msgid/opencog/CAHrUA379gBZu6ss19Er_6%2BRCbG8gaizA0%3Dj8BMGaLdEuzjJMQA%40mail.gmail.com>
<https://groups.google.com/d/msgid/opencog/CAHrUA379gBZu6ss19Er_6%2BRCbG8gaizA0%3Dj8BMGaLdEuzjJMQA%40mail.gmail.com
        
<https://groups.google.com/d/msgid/opencog/CAHrUA379gBZu6ss19Er_6%2BRCbG8gaizA0%3Dj8BMGaLdEuzjJMQA%40mail.gmail.com>>

<https://groups.google.com/d/msgid/opencog/CAHrUA379gBZu6ss19Er_6%2BRCbG8gaizA0%3Dj8BMGaLdEuzjJMQA%40mail.gmail.com?utm_medium=email&utm_source=footer
        
<https://groups.google.com/d/msgid/opencog/CAHrUA379gBZu6ss19Er_6%2BRCbG8gaizA0%3Dj8BMGaLdEuzjJMQA%40mail.gmail.com?utm_medium=email&utm_source=footer>
<https://groups.google.com/d/msgid/opencog/CAHrUA379gBZu6ss19Er_6%2BRCbG8gaizA0%3Dj8BMGaLdEuzjJMQA%40mail.gmail.com?utm_medium=email&utm_source=footer
        
<https://groups.google.com/d/msgid/opencog/CAHrUA379gBZu6ss19Er_6%2BRCbG8gaizA0%3Dj8BMGaLdEuzjJMQA%40mail.gmail.com?utm_medium=email&utm_source=footer>>>.


                          For more options, visit
        https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>
                     <https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>>
                          <https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>
                     <https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>>>.


                     --             You received this message because
        you are subscribed to the
                     Google Groups "opencog" group.
                     To unsubscribe from this group and stop receiving
        emails
                     from it, send an email to
        opencog+unsubscr...@googlegroups.com
        <mailto:opencog%2bunsubscr...@googlegroups.com>
                     <mailto:opencog%2bunsubscr...@googlegroups.com
        <mailto:opencog%252bunsubscr...@googlegroups.com>>
                     <mailto:opencog+unsubscr...@googlegroups.com
        <mailto:opencog%2bunsubscr...@googlegroups.com>
                     <mailto:opencog%2bunsubscr...@googlegroups.com
        <mailto:opencog%252bunsubscr...@googlegroups.com>>>.
                     To post to this group, send email to
        opencog@googlegroups.com <mailto:opencog@googlegroups.com>
        <mailto:opencog@googlegroups.com <mailto:opencog@googlegroups.com>>
                     <mailto:opencog@googlegroups.com
        <mailto:opencog@googlegroups.com>
                     <mailto:opencog@googlegroups.com
        <mailto:opencog@googlegroups.com>>>.
                     Visit this group at
        https://groups.google.com/group/opencog
        <https://groups.google.com/group/opencog>
                     <https://groups.google.com/group/opencog
        <https://groups.google.com/group/opencog>>.
                     To view this discussion on the web visit
        
https://groups.google.com/d/msgid/opencog/CALpD4-Kh5u2zZWAMAy8xZUTksqK9N83sUMe2mtzNRcz0j3LdKg%40mail.gmail.com
        
<https://groups.google.com/d/msgid/opencog/CALpD4-Kh5u2zZWAMAy8xZUTksqK9N83sUMe2mtzNRcz0j3LdKg%40mail.gmail.com>
<https://groups.google.com/d/msgid/opencog/CALpD4-Kh5u2zZWAMAy8xZUTksqK9N83sUMe2mtzNRcz0j3LdKg%40mail.gmail.com
        
<https://groups.google.com/d/msgid/opencog/CALpD4-Kh5u2zZWAMAy8xZUTksqK9N83sUMe2mtzNRcz0j3LdKg%40mail.gmail.com>>
<https://groups.google.com/d/msgid/opencog/CALpD4-Kh5u2zZWAMAy8xZUTksqK9N83sUMe2mtzNRcz0j3LdKg%40mail.gmail.com?utm_medium=email&utm_source=footer
        
<https://groups.google.com/d/msgid/opencog/CALpD4-Kh5u2zZWAMAy8xZUTksqK9N83sUMe2mtzNRcz0j3LdKg%40mail.gmail.com?utm_medium=email&utm_source=footer>
<https://groups.google.com/d/msgid/opencog/CALpD4-Kh5u2zZWAMAy8xZUTksqK9N83sUMe2mtzNRcz0j3LdKg%40mail.gmail.com?utm_medium=email&utm_source=footer
        
<https://groups.google.com/d/msgid/opencog/CALpD4-Kh5u2zZWAMAy8xZUTksqK9N83sUMe2mtzNRcz0j3LdKg%40mail.gmail.com?utm_medium=email&utm_source=footer>>>.

                     For more options, visit
        https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>
                     <https://groups.google.com/d/optout
        <https://groups.google.com/d/optout>>.




--
You received this message because you are subscribed to the Google Groups 
"opencog" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to opencog+unsubscr...@googlegroups.com.
To post to this group, send email to opencog@googlegroups.com.
Visit this group at https://groups.google.com/group/opencog.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/opencog/4011a6b8-061c-cbed-c5ec-04e7a948d2df%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to