Comments (8)
Strange, it works for me, but it may be lisp implementation dependent. I tried with sbcl and evaluated the form (+ SB-DEBUG::ARG-2 1)
in frame 11 (where this local variable was defined) and it just displayed the correct result. Is is possible that your swank server simply did not implement swank:inspect-in-frame
? What swank server do you use with what lisp implementation?
from slimv.
SBCL 1.3.14 on Debian amd64.
And when I got asked about the expression to evaluate I didn't use SB-DEBUG::ARG
, but the variable name within a form.
Perhaps slimv
should embed the user-provided form into a
(macrolet
((data sb-debug::arg-1)
(var2 sb-debug::arg-2))
<expression>)
to be safe against all and every transformations that might happen (including macros etc.)
from slimv.
How the swank debugger handles local variables depends on the lisp implementation and the optimize settings. In sbcl normally you see variables referenced as SB-DEBUG::ARG-n
(or may not see at all). But if you use this optimize setting (and recompile your code) then you'll see and be able to use your variable names:
(declaim (optimize (debug 3)))
from slimv.
Yeah, I've got that in my ~/.sbclrc
.
from slimv.
And does it work that way? If not, did you try to add this line directly to your source code?
Even if it does not work with sbcl, I think it's more a swank/lisp implementation issue, slimv cannot possibly do much when the swank server hides variables/variable names.
from slimv.
Well, I tested right now.
FILTER
I can inspect, but (IDENTITY FILTER)
gives me this error (Yeah, still another problem. Brrr.):
Inspect in frame 0 (evaluated): (identity FILTER)Fehler beim Ausführen von "function SlimvInspect[28]..SlimvRefreshReplBuffer[12]..SlimvSwankResponse[3]..provider#python3#Call":
Zeile 18:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/marek/.config/nvim//bundle/slimv/ftplugin/swank.py", line 1352, in swank_output
append_repl(result, 0)
File "/home/marek/.config/nvim//bundle/slimv/ftplugin/swank.py", line 1311, in append_repl
buf.append(lines[1:])
File "/usr/local/lib/python3.5/dist-packages/neovim/api/buffer.py", line 90, in append
return self.request('nvim_buf_set_lines', index, index, True, lines)
File "/usr/local/lib/python3.5/dist-packages/neovim/api/common.py", line 44, in request
return self._session.request(name, self, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/neovim/api/nvim.py", line 131, in request
res = self._session.request(name, *args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/neovim/msgpack_rpc/session.py", line 98, in request
raise self.error_wrapper(err)
neovim.api.nvim.NvimError: b'Vim:E315: ml_get: unzul\xc3\xa4ssige lnum: 28'
followed by the normal swank debugger window saying
The variable FILTER is unbound.
[Condition of type UNBOUND-VARIABLE]
...
Backtrace:
0: ((LAMBDA (#:G836)) #<unused argument>)
1: (SWANK/BACKEND:EVAL-IN-FRAME (IDENTITY FILTER) 0)
2: ((LAMBDA NIL :IN SWANK:INSPECT-IN-FRAME))
3: (SWANK::CALL-WITH-RETRY-RESTART "Retry SLIME inspection request." #<CLOSURE (LAMBDA NIL :IN SWANK:INSPECT-IN-FRAME) {100833DA9B}>)
4: ((LAMBDA NIL :IN SWANK:INSPECT-IN-FRAME))
5: (SWANK/BACKEND:CALL-WITH-SYNTAX-HOOKS #<CLOSURE (LAMBDA NIL :IN SWANK:INSPECT-IN-FRAME) {100833DA7B}>)
6: (SWANK::CALL-WITH-BUFFER-SYNTAX NIL #<CLOSURE (LAMBDA NIL :IN SWANK:INSPECT-IN-FRAME) {100833DA7B}>)
7: (SWANK:INSPECT-IN-FRAME "(identity FILTER)" 0)
8: (SB-INT:SIMPLE-EVAL-IN-LEXENV (SWANK:INSPECT-IN-FRAME "(identity FILTER)" 0) #<NULL-LEXENV>)
9: (EVAL (SWANK:INSPECT-IN-FRAME "(identity FILTER)" 0))
10: (SWANK:EVAL-FOR-EMACS (SWANK:INSPECT-IN-FRAME "(identity FILTER)" 0) "COMMON-LISP-USER" 21)
11: ((FLET #:FORM-FUN-6967 :IN SWANK::SLDB-LOOP))
This is slime-v2.18
from quicklisp
, no newer version available.
from slimv.
Did you recompile your lisp code after adding the optimize option? Did you try to evaluate in the proper frame?
I did the below and it worked for me, using sbcl 1.3.1 and swank 2.19 (the one embedded in slimv).
This was my test.lisp code:
(declaim (optimize (debug 3)))
(defun test (x)
(/ x 0))
(test 7)
I loaded it into vim, connected the swank server, then compiled and loaded the source test.lisp (by pressing ,L
). It immediately dropped me into the debugger because of the division by zero. Here I located frame of the call (test 7)
[it was frame 1], opened it by pressing Enter, then inspected (identity x)
that dropped me into the inspect buffer displaying value 7, etc.
from slimv.
After updating to slime-2.19
(from QL) (which is a complete different adventure, again) trying (identity ...)
I now get
The variable CVAR is unbound.
[Condition of type UNBOUND-VARIABLE]
So something's amiss. Sorry for the noise...
from slimv.
Related Issues (20)
- Attempting to slurp a string on the last line barfs instead HOT 1
- Eval and replaced evaluated form with result HOT 2
- Show describe-symbol in new buffer HOT 1
- Can slimv use ssh etc to connect to remote image ? HOT 5
- iskeyword conflict with vim-racket HOT 3
- Don't display escape characters in REPL HOT 5
- Slimv fails to autodetect mit-scheme and manual swank initiation fails too. HOT 3
- SlimvArglist does not handle context like for make-instance HOT 1
- [SOLVED] Unable to start swank server in NixOS HOT 8
- Installation via Plugin Manager? HOT 6
- Messages from xdg-open displayed in editor
- Slimv hangs after connecting to SWANK. HOT 8
- Evaluate expression command making new line before evaluating HOT 15
- Space as slimv_leader HOT 1
- package-local-nicknames support HOT 3
- Notice: slime-v2.28 is not compatible and causes slimv to appear to hang after trying to print a string HOT 5
- Function sent to REPL with ,d is added to wrong package HOT 15
- Connect to StumpWM's Lisp image HOT 2
- Segmentation fault sometimes when sbcl tries to load start-swank.lisp HOT 3
- Setting `syntax on` in Neovim causes error when connecting to SWANK HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from slimv.