Skip to content

Instantly share code, notes, and snippets.

@Metaxal
Last active October 28, 2021 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Metaxal/5c91eddafb86bb0c06b4d8322ad53045 to your computer and use it in GitHub Desktop.
Save Metaxal/5c91eddafb86bb0c06b4d8322ad53045 to your computer and use it in GitHub Desktop.
Map quickscript menus and keyboard shortcut to the Debug tool
#lang racket/base
;;; License: [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0) or
;;; [MIT license](http://opensource.org/licenses/MIT) at your option.
(require quickscript
racket/string
racket/list
racket/class)
(script-help-string "Add menu items and key shortcuts mapping to the Debug tool")
(define-script debug
#:label "Debug"
#:menu-path ("Debug")
#:shortcut f1
#:shortcut-prefix (shift)
(λ (selection #:frame drfr #:definitions defs)
(send (send drfr get-debug-button) command)))
(define-script debug-go
#:label "Go"
#:menu-path ("Debug")
#:shortcut f5
#:shortcut-prefix (shift)
(λ (selection #:frame drfr #:definitions defs)
(send (send drfr get-resume-button) command)))
(define-script debug-step
#:label "Step"
#:menu-path ("Debug")
#:shortcut f2
#:shortcut-prefix (shift)
(λ (selection #:frame drfr #:definitions defs)
(send (send drfr get-step-button) command)))
(define-script debug-over
#:label "Over"
#:menu-path ("Debug")
#:shortcut f3
#:shortcut-prefix (shift)
(λ (selection #:frame drfr #:definitions defs)
(send (send drfr get-step-over-button) command)))
(define-script debug-out
#:label "Out"
#:menu-path ("Debug")
#:shortcut f4
#:shortcut-prefix (shift)
(λ (selection #:frame drfr #:definitions defs)
(send (send drfr get-step-out-button) command)))
(module url2script-info racket/base
(provide filename url)
(define filename "debug-tool.rkt")
(define url "https://gist.github.com/Metaxal/5c91eddafb86bb0c06b4d8322ad53045"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment