armedbear / abcl

Armed Bear Common Lisp <git+https://github.com/armedbear/abcl/> <--> <svn+https://abcl.org/svn> Bridge
https://abcl.org#rdfs:seeAlso<https://gitlab.common-lisp.net/abcl/abcl>
Other
288 stars 29 forks source link

two problems I met about abcl-stepper #659

Closed Moriaty0o0 closed 7 months ago

Moriaty0o0 commented 7 months ago

Environment:

Armed Bear Common Lisp 1.9.2 Java 17.0.2 Oracle Corporation OpenJDK 64-Bit Server VM Windows 10 22H2

First, I can run (require :abcl-stepper) in emacs slime, but if I run this in powershell with java -jar abcl.jar, it throw error:

#<THREAD "interpreter" native {31391D4}>: Debugger invoked on condition of type SIMPLE-ERROR
  Don't know how to REQUIRE ABCL-STEPPER.
Restarts:
  0: TOP-LEVEL Return to top level.

Second , In emacs , step lisp form is ok, but when I follow the demo code in abcl-stepper README file, I step the test function:

(defun test ()
  (let ((*some-var* nil)
        (x 3))
    (list *some-var* 3)))

but when I type :s command , it directly return value:

CL-USER> (stepper:step (test))

We are in the stepper mode
Evaluating step 1 -->
(TEST)
Type ':?' for a list of options
:s
step 1 ==> value: (NIL 3)
(NIL 3)

Does anyone know whether there are something wrong? Thank you :blush:

alejandrozf commented 7 months ago

Hi @Moriaty0o0

Can't reproduce it on Windows, for me it is working fine.

For 1, could you check that you have the file 'abcl-contrib.jar' in the same folder with the file 'abcl.jar'? Also make sure you load (require :asdf) (require :abcl-contrib) before (require :abcl-stepper)

For 2, could you check if you are loading the 'test' function as an interpreted code, ABCL-STEPPER work with interpreted code, it won't step into compiled functions. In Emacs you can type C-M-x for getting interpreted code, C-c C-c will compile and load the code

Moriaty0o0 commented 7 months ago

Hi @Moriaty0o0

Can't reproduce it on Windows, for me it is working fine.

For 1, could you check that you have the file 'abcl-contrib.jar' in the same folder with the file 'abcl.jar'? Also make sure you load (require :asdf) (require :abcl-contrib) before (require :abcl-stepper)

For 2, could you check if you are loading the 'test' function as an interpreted code, ABCL-STEPPER work with interpreted code, it won't step into compiled functions. In Emacs you can type C-M-x for getting interpreted code, C-c C-c will compile and load the code

@alejandrozf Sorry I didn't get back to you until now.

For 1, I tried again at your suggestion with java 17.0.2 and 17.0.10, it still throw same error. But when I change to java 1.8.0_402, everything is ok. after a while, I was aware of the path of abcl.jar which is relative path ,no absolute path , So I change to absolute path , supprisely it works.

So I test the path deeply, I found java -jar abcl.jar and java -jar ./abcl.jar is ok, what is wrong is java -jar .\abcl.jar the jar file path of which is completed by tab key in powershell. I feel sorry to my previou words. , For 2, it works following your suggestion, Thank you.

alejandrozf commented 7 months ago

No problem @Moriaty0o0. I'm glad you solved the issue :)