I'm about ready to release an alpha version of my Eclipse-based Gambit IDE. TO get this working I had to make a small change to Gambit to enable another hook. If there is a better way to do this, using the existing binaries, I'd love to know it. Here's the patch to lib/_repl.scm:
============ 2145c2145 < (define-prim (##repl-within cont write-reason) ---
(define-prim (##repl-within-default cont write-reason)
2512a2513,2514
(set! ##repl-within ##repl-within-default)
==================
I'm asking about this because I started building a version of GSI with this feature on mulitple platforms, and its proving to be a challenge. If I could get a standard build with this feature it would be great.
It allows me to hook into ##repl-within any time an error or break happens
So far the IDE has: *debugging - stack trace and source location - inspection of lists, tables, and *closure* - stepping (sort of) *syntax coloring *indenting and formatting *Other things like autocompletion, source outline are not done *I don't think I can do true breakpoints without more support, but I might be able to do some function-breaks.
Afficher les réponses par date
William, I think the best is for me to make this change to the standard distribution. Note that recently I have made the following change to lib/_repl.scm:
(define ##repl #f) (set! ##repl (lambda (#!optional (write-reason #f)) (##continuation-capture (lambda (cont) (##repl-within cont write-reason)))))
Is this sufficient for your purpose, or do you really need ##repl- within to be mutable?
Moreover, I am working on a remote debugging protocol for Gambit. This will be used by the IDE for JazzScheme. Perhaps it will make sense to also use it as a basis for your Eclipse Gambit IDE.
Marc
On 22-Sep-08, at 5:56 PM, William Cook wrote:
I'm about ready to release an alpha version of my Eclipse-based Gambit IDE. TO get this working I had to make a small change to Gambit to enable another hook. If there is a better way to do this, using the existing binaries, I'd love to know it. Here's the patch to lib/_repl.scm:
============ 2145c2145
< (define-prim (##repl-within cont write-reason)
(define-prim (##repl-within-default cont write-reason)
2512a2513,2514
(set! ##repl-within ##repl-within-default)
==================
I'm asking about this because I started building a version of GSI with this feature on mulitple platforms, and its proving to be a challenge. If I could get a standard build with this feature it would be great.
It allows me to hook into ##repl-within any time an error or break happens
So far the IDE has: *debugging
- stack trace and source location
- inspection of lists, tables, and *closure*
- stepping (sort of)
*syntax coloring *indenting and formatting *Other things like autocompletion, source outline are not done *I don't think I can do true breakpoints without more support, but I might be able to do some function-breaks.
-- William Cook http://www.cs.utexas.edu/users/wcook _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Marc,
That's great news. Given that repl-within is only called by repl (and itself), I think that I can use a repl-hook instead. I'm not exactly sure why i went for repl-within instead of repl. I guess it allowed me to avoid copying the little bit of code in repl.
I am using he DBGp debug protocol because it is turning into something of a standard. xDEBUG DBGp Protocol ==> http://www.xdebug.org/docs-dbgp.php It would be great if the JazzScheme people could take a look at it and see if it would work for them. Its a pretty nice REST-based model: commands in and XML out. It is interesting to me that JazzScheme is rebuilding an approximation of Eclipse (graphical modeling, version comparison, source control) within Scheme, and of course it will probably be better than Eclipse in some ways... but its hard to beat the efforts of thousands of programmers over the last 10 years.
The Dynamic Languages Toolkit for Eclipse implements the IDE side of the DBGp protocol. http://www.eclipse.org/dltk/ So all I had to do to get a Gambit debugger was implement the Gambit side.
My Gambit stub for the DBGp protocol is only 650 lines of Scheme code, although it is not completely done yet, I must admit. I'm happy to let you see it, if you have any interest. In fact, it would be great if it were included in the main build too. That's the Java VMs work: the debug stubs are built in.
Having better debugger support in Gambit would be great. The main things that are lacking right now are * "step out" functionality (and step to next *line* would be nice) * breakpoints on individual lines I also have not fully figured out the protocol for continuing after a call that requires a value versus ones that don't, but its probably ok in the code.. its just confusing.
I don't see the change you mention below in the 4.2.8 build. When will it be released?
William
Marc Feeley wrote:
William, I think the best is for me to make this change to the standard distribution. Note that recently I have made the following change to lib/_repl.scm:
(define ##repl #f) (set! ##repl (lambda (#!optional (write-reason #f)) (##continuation-capture (lambda (cont) (##repl-within cont write-reason)))))
Is this sufficient for your purpose, or do you really need ##repl-within to be mutable?
Moreover, I am working on a remote debugging protocol for Gambit. This will be used by the IDE for JazzScheme. Perhaps it will make sense to also use it as a basis for your Eclipse Gambit IDE.
Marc
On 22-Sep-08, at 5:56 PM, William Cook wrote:
I'm about ready to release an alpha version of my Eclipse-based Gambit IDE. TO get this working I had to make a small change to Gambit to enable another hook. If there is a better way to do this, using the existing binaries, I'd love to know it. Here's the patch to lib/_repl.scm:
============ 2145c2145
< (define-prim (##repl-within cont write-reason)
(define-prim (##repl-within-default cont write-reason)
2512a2513,2514
(set! ##repl-within ##repl-within-default)
==================
I'm asking about this because I started building a version of GSI with this feature on mulitple platforms, and its proving to be a challenge. If I could get a standard build with this feature it would be great.
It allows me to hook into ##repl-within any time an error or break happens
So far the IDE has: *debugging
- stack trace and source location
- inspection of lists, tables, and *closure*
- stepping (sort of)
*syntax coloring *indenting and formatting *Other things like autocompletion, source outline are not done *I don't think I can do true breakpoints without more support, but I might be able to do some function-breaks.
-- William Cook http://www.cs.utexas.edu/users/wcook _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
One other thing that would be really useful for the debugger is the ability to evaluate within a context (eval exp context). The Gambit documentation says the second argument of eval is ignored.